Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible with Python 3.10 #89

Open
gaffney2010 opened this issue Nov 22, 2024 · 2 comments
Open

Not compatible with Python 3.10 #89

gaffney2010 opened this issue Nov 22, 2024 · 2 comments

Comments

@gaffney2010
Copy link
Member

I'm getting an error on importing with Python version >=3.8. This is a bug because axelrod requires Python >=3.10, and these libraries are intended to be used together.

Error:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/spawn.py", line 126, in _main
    self = reduction.pickle.load(from_parent)
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/site-packages/axelrod_fortran/__init__.py", line 3, in <module>
    from .player import Player
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/site-packages/axelrod_fortran/player.py", line 25, in <module>
    manager.start()
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/managers.py", line 579, in start
    self._process.start()
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/context.py", line 284, in _Popen
    return Popen(process_obj)
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 42, in _launch
    prep_data = spawn.get_preparation_data(process_obj._name)
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/spawn.py", line 154, in get_preparation_data
    _check_not_importing_main()
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/spawn.py", line 134, in _check_not_importing_main
    raise RuntimeError('''
RuntimeError: 
        An attempt has been made to start a new process before the
        current process has finished its bootstrapping phase.

        This probably means that you are not using fork to start your
        child processes and you have forgotten to use the proper idiom
        in the main module:

            if __name__ == '__main__':
                freeze_support()
                ...

        The "freeze_support()" line can be omitted if the program
        is not going to be frozen to produce an executable.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/site-packages/axelrod_fortran/__init__.py", line 3, in <module>
    from .player import Player
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/site-packages/axelrod_fortran/player.py", line 25, in <module>
    manager.start()
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/managers.py", line 583, in start
    self._address = reader.recv()
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/connection.py", line 250, in recv
    buf = self._recv_bytes()
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/connection.py", line 414, in _recv_bytes
    buf = self._recv(4)
  File "/usr/local/anaconda3/envs/my_axl/lib/python3.8/multiprocessing/connection.py", line 383, in _recv
    raise EOFError
EOFError

Steps to reproduce:

  • conda create --name my_axl python=3.10
  • conda activate my_axl
  • pip install axelrod-fortran
  • python
  • import axelrod_fortran as axlf
@drvinceknight
Copy link
Member

Eurgh...

@drvinceknight
Copy link
Member

Eurgh...

That's unhelpful by me 😆. Will try and take a look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants