Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Issues in installation of packages using pip #95

Open
piyush-bagad opened this issue May 1, 2021 · 6 comments
Open

Issues in installation of packages using pip #95

piyush-bagad opened this issue May 1, 2021 · 6 comments

Comments

@piyush-bagad
Copy link

As per README, I ran pip install -r requirements.txt. I am using a conda environment.

  1. But this causes the following issue(s) in installing cartopy:
setup.py:117: UserWarning: Unable to determine GEOS version. Ensure you have 3.3.3 or later installed, or installation may fail.
    warnings.warn(
  Proj 4.9.0 must be installed.

I found the following to be useful to fix this on mac:

brew install geos
brew install proj
conda install cartopy

Will be adding more issues here as I encounter them.

@piyush-bagad
Copy link
Author

Issues in installing Fiona

Failed to get options via gdal-config: [Errno 2] No such file or directory: 'gdal-config'
    A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.

I solved this using (ref: this):

  1. Install GDAL framework using dmg installer for MAC [GDAL MAC Frameworks]: http://www.kyngchaos.com/software/frameworks

  2. Add the gdal-config folder to your path and get your version:

$ export PATH=/Library/Frameworks/GDAL.framework/Versions//Programs:$PATH

  1. Check
$ gdal-config --version
  1. Install Fiona
pip install Fiona==1.8.17

@piyush-bagad
Copy link
Author

piyush-bagad commented May 1, 2021

Another error:

ERROR: Cannot install -r requirements.txt (line 9) and wrapt==1.12.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested wrapt==1.12.1
    astroid 2.3.3 depends on wrapt==1.11.*

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

Solution: had to change the following in requirements.txt

-rsa==4.1
+rsa
-wrapt==1.12.1
+wrapt

@sansiddh
Copy link
Contributor

Hey Piyush

Sorry I was out of circulation for a while.

@sansiddh
Copy link
Contributor

Okay, I will note down the second solution!

Also, there are a few things in requirements.txt that are not super important, esp for new users. cartopy is one of them. I will prune it out of the requirements.txt

@sansiddh
Copy link
Contributor

Would generally recommend doing cat requirements.txt | xargs -n 1 pip install instead of pip install -r requirements.txt because the former doesn't stop working if it is unable to install 1 package

@piyush-bagad
Copy link
Author

Okay, I will note down the second solution!

Also, there are a few things in requirements.txt that are not super important, esp for new users. cartopy is one of them. I will prune it out of the requirements.txt

Do check this out to extract concise requirements: pip-chill

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants