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

AttributeError: module 'pyproj' has no attribute 'network' #140

Open
lauraset opened this issue Mar 3, 2023 · 3 comments
Open

AttributeError: module 'pyproj' has no attribute 'network' #140

lauraset opened this issue Mar 3, 2023 · 3 comments

Comments

@lauraset
Copy link

lauraset commented Mar 3, 2023

Hello, @carlodef .
I have successfully installed s2p in Ubuntu 18.04 using pip install s2p, and
the version of pyproj is 2.6.1.
But when I run s2p in the cmd, errors happened:
(venv1) yinxcao@DESKTOP-OKGUJDC:~$ s2p Traceback (most recent call last): File "/home/yinxcao/venv1/bin/s2p", line 11, in <module> load_entry_point('s2p==1.0b25', 'console_scripts', 's2p')() File "/home/yinxcao/venv1/lib/python3.6/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/home/yinxcao/venv1/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2693, in load_entry_point return ep.load() File "/home/yinxcao/venv1/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2324, in load return self.resolve() File "/home/yinxcao/venv1/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2330, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/home/yinxcao/venv1/lib/python3.6/site-packages/s2p/__init__.py", line 37, in <module> from s2p import initialization File "/home/yinxcao/venv1/lib/python3.6/site-packages/s2p/initialization.py", line 12, in <module> import rpcm File "/home/yinxcao/venv1/lib/python3.6/site-packages/rpcm/__init__.py", line 8, in <module> import srtm4 File "/home/yinxcao/venv1/lib/python3.6/site-packages/srtm4/__init__.py", line 7, in <module> from srtm4.raster import crop File "/home/yinxcao/venv1/lib/python3.6/site-packages/srtm4/raster.py", line 15, in <module> pyproj.network.set_network_enabled(active=True) AttributeError: module 'pyproj' has no attribute 'network'
Do you know what happens? Thank you in advance.

@kidanger
Copy link
Member

kidanger commented Mar 3, 2023

Hello,

Can you try installing it from the git repository?

Python 3.6 is no longer supported, and 3.7 will be unsupported soon as well (https://devguide.python.org/versions/).
Your error should disappear with a more recent version of pyproj (>=3.x.x), which might imply a more recent version of python.

@lauraset
Copy link
Author

lauraset commented Mar 3, 2023 via email

@lauraset
Copy link
Author

lauraset commented Mar 4, 2023

Hi, @kidanger . I have solved this issue when using python 3.8 and installing s2p from the git respository. Thank you very much.

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