WadhwaniAI / covid-modelling

Repo for modelling the spread of novel Covid-19
MIT License
5 stars 0 forks source link

Issues in installation of packages using pip #95

Open piyush-bagad opened 3 years ago

piyush-bagad commented 3 years ago

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 commented 3 years ago

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

3) Check

$ gdal-config --version

4) Install Fiona

pip install Fiona==1.8.17
piyush-bagad commented 3 years ago

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 commented 3 years ago

Hey Piyush

Sorry I was out of circulation for a while.

sansiddh commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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