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

Python 3.13 compatibility #608

Open
jameswilburlewis opened this issue Nov 12, 2024 · 3 comments
Open

Python 3.13 compatibility #608

jameswilburlewis opened this issue Nov 12, 2024 · 3 comments

Comments

@jameswilburlewis
Copy link

basemap does not "pip install" cleanly under Python 3.13. Might be related to some of the pinned upper versions of package dependencies? This environment had numpy 1.26.4 installed (so not a numpy 2.0 issue).

(pycharm_py313) jwl@jwl-new-mac pyspedas_py313 % pip install basemap       
Collecting basemap
  Using cached basemap-1.3.9.zip (156 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [63 lines of output]
      Ignoring numpy: markers 'python_version == "3.10"' don't match your environment
      Ignoring numpy: markers 'sys_platform == "darwin" and (python_version >= "3.7" and python_version <= "3.9")' don't match your environment
      Ignoring numpy: markers 'sys_platform != "darwin" and (python_version >= "3.7" and python_version <= "3.9")' don't match your environment
      Ignoring numpy: markers 'python_version == "2.7" or (python_version >= "3.4" and python_version <= "3.6")' don't match your environment
      Ignoring numpy: markers 'python_version == "2.6" or (python_version >= "3.2" and python_version <= "3.3")' don't match your environment
      Ignoring cython: markers 'python_version == "3.2"' don't match your environment
      Collecting setuptools
        Using cached setuptools-75.4.0-py3-none-any.whl.metadata (6.8 kB)
      Collecting wheel
        Using cached wheel-0.45.0-py3-none-any.whl.metadata (2.3 kB)
      Collecting numpy==1.23.3
        Using cached numpy-1.23.3.tar.gz (10.7 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'error'
        error: subprocess-exited-with-error
      
        × Getting requirements to build wheel did not run successfully.
        │ exit code: 1
        ╰─> [32 lines of output]
            Traceback (most recent call last):
              File "/Users/jwl/anaconda3/envs/pycharm_py313/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
                main()
                ~~~~^^
              File "/Users/jwl/anaconda3/envs/pycharm_py313/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
                json_out['return_val'] = hook(**hook_input['kwargs'])
                                         ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
              File "/Users/jwl/anaconda3/envs/pycharm_py313/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 112, in get_requires_for_build_wheel
                backend = _build_backend()
              File "/Users/jwl/anaconda3/envs/pycharm_py313/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
                obj = import_module(mod_path)
              File "/Users/jwl/anaconda3/envs/pycharm_py313/lib/python3.13/importlib/__init__.py", line 88, 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 1022, in exec_module
              File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
              File "/private/var/folders/_4/hbrtgs_j1qlgl2f3fwjw2_kc0000gn/T/pip-build-env-83asxxgw/overlay/lib/python3.13/site-packages/setuptools/__init__.py", line 16, in <module>
                import setuptools.version
              File "/private/var/folders/_4/hbrtgs_j1qlgl2f3fwjw2_kc0000gn/T/pip-build-env-83asxxgw/overlay/lib/python3.13/site-packages/setuptools/version.py", line 1, in <module>
                import pkg_resources
              File "/private/var/folders/_4/hbrtgs_j1qlgl2f3fwjw2_kc0000gn/T/pip-build-env-83asxxgw/overlay/lib/python3.13/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'?
            [end of output]
 
@DWesl
Copy link
Contributor

DWesl commented Nov 13, 2024

Failing in import setuptools.version is odd; does pip install --no-build-isolation basemap do the same thing?

@molinav
Copy link
Member

molinav commented Nov 13, 2024

Currently, Python 3.13 is still not supported by basemap (there is also a pin <3.13 for Python in setup.py). I am aware that Python 3.13 was released last October, and I would like to add the support, but currently I am a bit overloaded at my job.

Hopefully in December I will get some time free (aka Christmas present releases).

@jameswilburlewis
Copy link
Author

@molinav Thanks for checking, I hope I've been good enough this year to be deserving of a nice Christmas release!

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

3 participants