multiscale / muscle3

The third major version of the MUltiScale Coupling Library and Environment
Apache License 2.0
25 stars 13 forks source link

Installation fails with Python 3.12 #297

Closed ETsingos closed 1 month ago

ETsingos commented 1 month ago

The install instructions (https://muscle3.readthedocs.io/en/latest/installing.html) fail in the last step while installing dependencies. It seems to be an issue specific to Python 3.12, as downgrading to Python 3.11.9 using pyenv fixes the issue.

Full error message:

(muscle3_venv) user@computer:~/Desktop:pip install muscle3 --verbose
Using pip 24.1.2 from /home/user/Desktop/muscle3_venv/lib/python3.12/site-packages/pip (python 3.12)
Collecting muscle3
  Obtaining dependency information for muscle3 from https://files.pythonhosted.org/packages/11/14/1ff469ed4e35c690f4280f07b5cba7584a8dd70c85ce4b689099a6f32b58/muscle3-0.7.1-py3-none-any.whl.metadata
  Using cached muscle3-0.7.1-py3-none-any.whl.metadata (3.8 kB)
Collecting click<9,>=7.1 (from muscle3)
  Obtaining dependency information for click<9,>=7.1 from https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl.metadata
  Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
Collecting matplotlib<4,>=3 (from muscle3)
  Obtaining dependency information for matplotlib<4,>=3 from https://files.pythonhosted.org/packages/0d/cb/78283ec2ded91fb74a2ae9ae93f91a897fa578fa78c8c271a7c147f6b8d6/matplotlib-3.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Using cached matplotlib-3.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)
Collecting msgpack<2,>=1 (from muscle3)
  Obtaining dependency information for msgpack<2,>=1 from https://files.pythonhosted.org/packages/04/2a/c833a8503be9030083f0469e7a3c74d3622a3b4eae676c3934d3ccc01036/msgpack-1.0.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Using cached msgpack-1.0.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (9.1 kB)
Collecting netifaces==0.11.0 (from muscle3)
  Using cached netifaces-0.11.0.tar.gz (30 kB)
  Running command python setup.py egg_info
  running egg_info
  creating /tmp/pip-pip-egg-info-2yt0aaae/netifaces.egg-info
  writing /tmp/pip-pip-egg-info-2yt0aaae/netifaces.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-pip-egg-info-2yt0aaae/netifaces.egg-info/dependency_links.txt
  writing top-level names to /tmp/pip-pip-egg-info-2yt0aaae/netifaces.egg-info/top_level.txt
  writing manifest file '/tmp/pip-pip-egg-info-2yt0aaae/netifaces.egg-info/SOURCES.txt'
  reading manifest file '/tmp/pip-pip-egg-info-2yt0aaae/netifaces.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE'
  writing manifest file '/tmp/pip-pip-egg-info-2yt0aaae/netifaces.egg-info/SOURCES.txt'
  Preparing metadata (setup.py) ... done
Collecting qcg-pilotjob==0.13.1 (from muscle3)
  Obtaining dependency information for qcg-pilotjob==0.13.1 from https://files.pythonhosted.org/packages/59/f2/49683337c94dbf7e3b836eb742df1423255d41cd0edb5da4d661f7498df6/qcg_pilotjob-0.13.1-py3-none-any.whl.metadata
  Using cached qcg_pilotjob-0.13.1-py3-none-any.whl.metadata (2.9 kB)
Collecting typing-extensions<5,>=4.4.0 (from muscle3)
  Obtaining dependency information for typing-extensions<5,>=4.4.0 from https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl.metadata
  Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Collecting ymmsl<0.14,>=0.13.0 (from muscle3)
  Obtaining dependency information for ymmsl<0.14,>=0.13.0 from https://files.pythonhosted.org/packages/23/fc/bac6fcaac3b5d129bf2828166c6f17ee8373dec61648d41af63d4de083cc/ymmsl-0.13.0-py3-none-any.whl.metadata
  Using cached ymmsl-0.13.0-py3-none-any.whl.metadata (3.1 kB)
  Link requires a different Python (3.12.4 not in: '>=3.7,<3.11'): https://files.pythonhosted.org/packages/3a/be/650f9c091ef71cb01d735775d554e068752d3ff63d7943b26316dc401749/numpy-1.21.2.zip (from https://pypi.org/simple/numpy/) (requires-python:>=3.7,<3.11)
  Link requires a different Python (3.12.4 not in: '>=3.7,<3.11'): https://files.pythonhosted.org/packages/5f/d6/ad58ded26556eaeaa8c971e08b6466f17c4ac4d786cd3d800e26ce59cc01/numpy-1.21.3.zip (from https://pypi.org/simple/numpy/) (requires-python:>=3.7,<3.11)
  Link requires a different Python (3.12.4 not in: '>=3.7,<3.11'): https://files.pythonhosted.org/packages/fb/48/b0708ebd7718a8933f0d3937513ef8ef2f4f04529f1f66ca86d873043921/numpy-1.21.4.zip (from https://pypi.org/simple/numpy/) (requires-python:>=3.7,<3.11)
  Link requires a different Python (3.12.4 not in: '>=3.7,<3.11'): https://files.pythonhosted.org/packages/c2/a8/a924a09492bdfee8c2ec3094d0a13f2799800b4fdc9c890738aeeb12c72e/numpy-1.21.5.zip (from https://pypi.org/simple/numpy/) (requires-python:>=3.7,<3.11)
  Link requires a different Python (3.12.4 not in: '>=3.7,<3.11'): https://files.pythonhosted.org/packages/45/b7/de7b8e67f2232c26af57c205aaad29fe17754f793404f59c8a730c7a191a/numpy-1.21.6.zip (from https://pypi.org/simple/numpy/) (requires-python:>=3.7,<3.11)
Collecting numpy<=1.25,>=1.22 (from muscle3)
  Using cached numpy-1.25.0.tar.gz (10.4 MB)
  Running command pip subprocess to install build dependencies
  Using pip 24.1.2 from /home/user/Desktop/muscle3_venv/lib/python3.12/site-packages/pip (python 3.12)
  Collecting setuptools==59.2.0
    Obtaining dependency information for setuptools==59.2.0 from https://files.pythonhosted.org/packages/18/ad/ec41343a49a0371ea40daf37b1ba2c11333cdd121cb378161635d14b9750/setuptools-59.2.0-py3-none-any.whl.metadata
    Using cached setuptools-59.2.0-py3-none-any.whl.metadata (5.0 kB)
  Collecting wheel==0.38.1
    Obtaining dependency information for wheel==0.38.1 from https://files.pythonhosted.org/packages/84/a8/4dab22a963a756e5b54ce0ab5c900c54329cff38e163fe3c67c858240ec6/wheel-0.38.1-py3-none-any.whl.metadata
    Using cached wheel-0.38.1-py3-none-any.whl.metadata (2.1 kB)
  Collecting Cython<3.0,>=0.29.34
    Obtaining dependency information for Cython<3.0,>=0.29.34 from https://files.pythonhosted.org/packages/c9/aa/99a0eac01136c0c75feb3210d107c49f93d49d5cb97f19e99318b9ecefdd/Cython-0.29.37-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.metadata
    Using cached Cython-0.29.37-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl.metadata (3.1 kB)
  Using cached setuptools-59.2.0-py3-none-any.whl (952 kB)
  Using cached wheel-0.38.1-py3-none-any.whl (35 kB)
  Using cached Cython-0.29.37-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl (2.0 MB)
  Installing collected packages: wheel, setuptools, Cython
    Creating /tmp/pip-build-env-uw8r_c7i/overlay/bin
    changing mode of /tmp/pip-build-env-uw8r_c7i/overlay/bin/wheel to 755
    changing mode of /tmp/pip-build-env-uw8r_c7i/overlay/bin/cygdb to 755
    changing mode of /tmp/pip-build-env-uw8r_c7i/overlay/bin/cython to 755
    changing mode of /tmp/pip-build-env-uw8r_c7i/overlay/bin/cythonize to 755
  Successfully installed Cython-0.29.37 setuptools-59.2.0 wheel-0.38.1
  Installing build dependencies ... done
  Running command Getting requirements to build wheel
  Traceback (most recent call last):
    File "/home/user/Desktop/muscle3_venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/user/Desktop/muscle3_venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/user/Desktop/muscle3_venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 112, in get_requires_for_build_wheel
      backend = _build_backend()
                ^^^^^^^^^^^^^^^^
    File "/home/user/Desktop/muscle3_venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
      obj = import_module(mod_path)
            ^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/user/miniconda3/lib/python3.12/importlib/__init__.py", line 90, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
    File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 995, in exec_module
    File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
    File "/tmp/pip-build-env-uw8r_c7i/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 16, in <module>
      import setuptools.version
    File "/tmp/pip-build-env-uw8r_c7i/overlay/lib/python3.12/site-packages/setuptools/version.py", line 1, in <module>
      import pkg_resources
    File "/tmp/pip-build-env-uw8r_c7i/overlay/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2172, in <module>
      register_finder(pkgutil.ImpImporter, find_on_path)
                      ^^^^^^^^^^^^^^^^^^^
  AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /home/user/Desktop/muscle3_venv/bin/python3 /home/user/Desktop/muscle3_venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpvqtvra3y
  cwd: /tmp/pip-install-vov_atjr/numpy_a95ec1b5ccaf4a7295be39f7c7d63136
  Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
LourensVeen commented 1 month ago

Ah, looks like the numpy version we're pinned to doesn't support 3.12. I've already unpinned it and added 3.12 to the list of Python versions MUSCLE3 supports, but it's not been released yet. I'll go make a new release soon.

Thanks for reporting!

LourensVeen commented 1 month ago

This was released with 0.7.2. Please give it a try, and if it works could you close this issue?

ETsingos commented 1 month ago

Can confirm it works now, thanks!