Closed nsunami closed 2 years ago
I just added requirements.txt using anaconda try that out and let me know
Thanks! But, I cannot use the requirements.txt because it contains paths to environment-specific packages (it seems like).
The paths to the packages seem to be hard-coded like this:
file:///home/conda/feedstock_root/build_artifacts/anaconda-client_1619451397123/work
So, running the command pip3 install -r requirements.txt
fails:
Processing /home/conda/feedstock_root/build_artifacts/anaconda-client_1619451397123/work
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/System/Volumes/Data/home/conda/feedstock_root/build_artifacts/anaconda-client_1619451397123/work'
I have created a new requirements-linux.txt which worked on my MacOS
Great! But still not working...
Ran pip3 install -r requiremnts-linux.txt
on a conda environment.
Got the following error:
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [1 lines of output]
proj executable not found. Please set the PROJ_DIR variable. For more information see: https://pyproj4.github.io/pyproj/stable/installation.html
[end of output]
Tried export PROJ_DIR=/usr/local
on terminal
Got a new error:
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [3 lines of output]
PROJ_DIR is set, using existing PROJ installation..
ERROR: PROJ_INCDIR dir not found. Please set PROJ_INCDIR.
[end of output]
Gave up on using pip and moved on to conda install
virtualenv
and try againI tried creating a virtual environment via virtualenv (not conda) and tried running pip3 install -r requiremnts-linux.txt
, but ended up in the same place as above.
Ran conda install --file requiremnts-linux.txt
Failed with the following error:
PackagesNotFoundError: The following packages are not available from current channels:
- shapely==1.8.1.post1
- click==8.1.0
- kiwisolver==1.4.1
Current channels:
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
shapely
, click
, and kiwisolver
to what's available on the conda forge. But a got a lengthy error on dependency (UnsatisfiableError: The following specifications were found to be incompatible with each other: ...
)I'm here now. Maybe a gremlin lives in my environment 😆 . Will continue troubleshooting.
I solved the issue!
For some reason, my python
alias was leading to /usr/bin/python
even within the virtual environment.
I had to do conda deactivate
several times to get out from the base environment. And then conda activate ...
to activate the environment.
Checking with which python
:
/Users/nami/opt/anaconda3/envs/redistricting/bin/python
Then all is good to go! I still don't know why activating an environment from my base environment was pointing to /usr/bin/python
I cannot start the main.py after installing dependencies. It seems that importing geopandas is failing. I'm using Mac.
I found a fix discussed on geopanda's repo: https://github.com/conda-forge/geopandas-feedstock/issues/45
Full error log:
``` Traceback (most recent call last): File "/Users/nami/git/census-tract-redistricting/main.py", line 3, in