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

pyproj 3.3.0 show_version() raises exception #1017

Closed
bal-agates opened this issue Jan 22, 2022 · 2 comments · Fixed by #1019
Closed

pyproj 3.3.0 show_version() raises exception #1017

bal-agates opened this issue Jan 22, 2022 · 2 comments · Fixed by #1019
Labels

Comments

@bal-agates
Copy link

Running the following code raises an exception. About 2 months ago this worked. Version on my computer that I am aware have changed since it last work are:

  • macOS from 12.0 to 12.1
  • Python from 3.9.9 to 3.9.10.
  • Python setuptools from 59.4.0 to 60.5.0_0
  • Cython from 0.29.24 to 0.29.26

I cannot tell if this is a pyproj problem or a Python problem.

Code Sample, a copy-pastable example if possible

import pyproj
print(pyproj.show_versions())

Problem description

Raises exception. Has the following output.

pyproj info:
    pyproj: 3.3.0
      PROJ: 8.2.0
  data dir: /opt/local/lib/proj8/share/proj
user_data_dir: /Users/brett/Library/Application Support/proj
PROJ DATA (recommended version): 1.8
PROJ Database: 1.2
EPSG Database: v10.041 [2021-12-03]
ESRI Database: ArcMap 12.8 [2021-05-06]
IGNF Database: 3.1.0 [2019-05-24]

System:
    python: 3.9.10 (main, Jan 15 2022, 18:27:37)  [Clang 13.0.0 (clang-1300.0.29.3)]
executable: /opt/local/bin/python
   machine: macOS-12.1-arm64-arm-64bit

Python deps:
Traceback (most recent call last):
  File "/Users/brett/Brett2021/Source/Python/proj/pyproj_version.py", line 3, in <module>
    print(pyproj.show_versions())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyproj/_show_versions.py", line 130, in show_versions
    _print_info_dict(_get_deps_info())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyproj/_show_versions.py", line 99, in _get_deps_info
    mod = importlib.import_module(modname)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/__init__.py", line 8, in <module>
    import _distutils_hack.override  # noqa: F401
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/_distutils_hack/override.py", line 1, in <module>
    __import__('_distutils_hack').do_override()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/_distutils_hack/__init__.py", line 71, in do_override
    ensure_local_distutils()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/_distutils_hack/__init__.py", line 59, in ensure_local_distutils
    assert '_distutils' in core.__file__, core.__file__
AssertionError: /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py

Expected Output

This output was generated by the same command about 2 months ago. Expecting a few version differences.

pyproj info:
    pyproj: 3.3.0
      PROJ: 8.2.0
  data dir: /opt/local/lib/proj8/share/proj
user_data_dir: /Users/brett/Library/Application Support/proj
PROJ DATA (recommended version): 1.8
PROJ Database: 1.2
EPSG Database: v10.038 [2021-10-21]
ESRI Database: ArcMap 12.8 [2021-05-06]
IGNF Database: 3.1.0 [2019-05-24]

System:
    python: 3.9.9 (main, Nov 16 2021, 07:57:58)  [Clang 13.0.0 (clang-1300.0.29.3)]
executable: /opt/local/bin/python
   machine: macOS-12.0.1-arm64-arm-64bit

Python deps:
   certifi: 2021.10.08
       pip: 21.3.1
setuptools: 59.4.0
    Cython: 0.29.24
None

Environment Information

Most version info captured above. I manually checked the following:

py39-certifi @2021.10.8_0
py39-pip @21.3.1_0
py39-setuptools @60.5.0_0
py39-cython @0.29.26_0

Installation method

MacPorts installs of both python39 @3.9.10_0+lto+optimizations and py39-pyproj @3.3.0_0

@bal-agates bal-agates added the bug label Jan 22, 2022
@snowman2
Copy link
Member

This is likely related the build failures we are seeing.

@snowman2 snowman2 added this to To do in 3.3.1 Release via automation Jan 23, 2022
@snowman2
Copy link
Member

Related: pypa/setuptools#3044

3.3.1 Release automation moved this from To do to Done Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants