Reputation: 26525
I have the versioneer
module installed in my environment, as confirmed by running python -m versioneer --version
. Yet when I pip install cartopy
, I still get a ModuleNotFoundError
, as shown below:
(GIS3) gholl@lce00:~> python -m versioneer --version
versioneer (installer) 0.18
(GIS3) gholl@lce00:~> python -V
Python 3.7.1
(GIS3) gholl@lce00:~> which python
/hpc/uhome/gholl/miniconda3/envs/GIS3/bin/python
(GIS3) gholl@lce00:~> which pip
/hpc/uhome/gholl/miniconda3/envs/GIS3/bin/pip
(GIS3) gholl@lce00:~> pip install cartopy
Collecting cartopy
Using cached https://files.pythonhosted.org/packages/e5/92/fe8838fa8158931906dfc4f16c5c1436b3dd2daf83592645b179581403ad/Cartopy-0.17.0.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... error
Complete output from command /hpc/uhome/gholl/miniconda3/envs/GIS3/bin/python /hpc/uhome/gholl/miniconda3/envs/GIS3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /hpc/gtmp/gholl/.jtmp.lce00.20190206.082115.24214/tmpmcze3ux9:
Traceback (most recent call last):
File "/hpc/uhome/gholl/miniconda3/envs/GIS3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
main()
File "/hpc/uhome/gholl/miniconda3/envs/GIS3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/hpc/uhome/gholl/miniconda3/envs/GIS3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 54, in get_requires_for_build_wheel
return hook(config_settings)
File "/lustre1/gtmp/gholl/.jtmp.lce00.20190206.082115.24214/pip-build-env-q2k4jnrs/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 130, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/lustre1/gtmp/gholl/.jtmp.lce00.20190206.082115.24214/pip-build-env-q2k4jnrs/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 112, in _get_build_requires
self.run_setup()
File "/lustre1/gtmp/gholl/.jtmp.lce00.20190206.082115.24214/pip-build-env-q2k4jnrs/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 126, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 36, in <module>
import versioneer
ModuleNotFoundError: No module named 'versioneer'
----------------------------------------
Command "/hpc/uhome/gholl/miniconda3/envs/GIS3/bin/python /hpc/uhome/gholl/miniconda3/envs/GIS3/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /hpc/gtmp/gholl/.jtmp.lce00.20190206.082115.24214/tmpmcze3ux9" failed with error code 1 in /lustre1/gtmp/gholl/.jtmp.lce00.20190206.082115.24214/pip-install-2q1hjb0u/cartopy
How can it be that the versioneer
module is installed but pip install cartopy
still fails to find it?
(I'm aware I should probably not pip install into a conda environment, but I am meanwhile debugging a problem where a complete conda install
either wants to downgrade Python, or results in undefined symbol or cannot open shared object file errors, so this question does have an XY problem aspect to it — however, I still have additional things to try for my Y)
Upvotes: 2
Views: 1884
Reputation: 9161
I ran into this error, and this solved it for me.
I think versioneer needs to be installed in the build environment, which I have to assume is separate from when you've installed it.
Upvotes: 0
Reputation: 986
There's a known issue with Cartopy 0.17.0, as referenced here: Unable to install cartopy from pip on MacOSX #1270
You can try pip install cartopy==0.16.0
instead, or also try using pip install --no-use-pep517 cartopy
. Alternatively, this seems to be an issue with >= 0.19, so you can also try downgrading pip.
Upvotes: 1