njcuk9999 / lbl

Line by line code for radial velocity
MIT License
15 stars 3 forks source link

installation error #10

Closed clairem789 closed 1 year ago

clairem789 commented 3 years ago

I got the following error when running the installation script: ... Building wheels for collected packages: bottleneck Building wheel for bottleneck (PEP 517) ... error ERROR: Command errored out with exit status 1: command: /Users/clairemoutou/anaconda3/envs/lbl-env/bin/python /Users/clairemoutou/anaconda3/envs/lbl-env/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/03/70tg67hj12ggjmcwh0kr8jrr0000gn/T/tmpj0c1x8zl

... gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/clairemoutou/anaconda3/envs/lbl-env/include -arch x86_64 -I/Users/clairemoutou/anaconda3/envs/lbl-env/include -arch x86_64 -c _configtest.c -o _configtest.o xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun failure. removing: _configtest.c _configtest.o building 'bottleneck.reduce' extension creating build/temp.macosx-10.9-x86_64-3.8 creating build/temp.macosx-10.9-x86_64-3.8/bottleneck creating build/temp.macosx-10.9-x86_64-3.8/bottleneck/src gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/clairemoutou/anaconda3/envs/lbl-env/include -arch x86_64 -I/Users/clairemoutou/anaconda3/envs/lbl-env/include -arch x86_64 -I/private/var/folders/03/70tg67hj12ggjmcwh0kr8jrr0000gn/T/pip-build-env-j3shnh7p/overlay/lib/python3.8/site-packages/numpy/core/include -I/Users/clairemoutou/anaconda3/envs/lbl-env/include/python3.8 -Ibottleneck/src -c bottleneck/src/reduce.c -o build/temp.macosx-10.9-x86_64-3.8/bottleneck/src/reduce.o -O2 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun error: command 'gcc' failed with exit status 1

ERROR: Failed building wheel for bottleneck Failed to build bottleneck ERROR: Could not build wheels for bottleneck which use PEP 517 and cannot be installed directly

Any clue?

jorgehumberto commented 3 years ago

Hi Claire,

I found the following thread online that might help:

https://github.com/pydata/bottleneck/issues/281

not sure if it's the same issue, but it loks it might be with your local anaconda isntallation.

They suggest several solutions: a) upgrade the setuptools and wheel pip install --upgrade pip setuptools wheel

b) installing the python3 development tools: on fedora: dnf install python3-devel

on centos: yum install -y python3-devel

not sure what is the package in ubuntu, sorry

c) try to install bottleneck manually:

python3 -m pip install bottleneck

d) downgrade pip

pip install pip==18.1 (maybe another version would work as well?)

Cheers Jorge

clairem789 commented 3 years ago

thanks Jorge. I tried all this, but it failed.

jorgehumberto commented 3 years ago

hum, sorry, just notivced you're using a mac. Could this help?

https://ma.ttias.be/mac-os-xcrun-error-invalid-active-developer-path-missing-xcrun/

Cheers Jorge

clairem789 commented 3 years ago

You are right, it worked for bottleneck. I can't still clone github (permission denied), but I was able to download the zip file and install the package. Thanks!

jorgehumberto commented 3 years ago

About the clone github, I had the same issue, and it was just a matter of re-linking my gihut account on my lixnu account. NOt sure for Mac, but it should be similar.

This helped me setting it up:

https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh

Good luck!

njcuk9999 commented 3 years ago

So two things to add to the comments from Jorge

  1. I always use miniconda not anaconda as the base conda environment - anaconda installs hundreds of packages which make it difficult to have the same versions as we are using, whereas miniconda installs the bare minimum. Make sure when setting up the environment to do: conda create --name=lbl-env python=3.8
    and then activate the environment and do "which pip" to make sure the pip is associated with your new environment. We have run these steps on a mac before though I guess it could depend on the OS version the GCC error is a C compiler error so sounds like something installed badly or didn't install at all at the python level

  2. Git now requires a token based authorization so to clone you must use a token or an ssh key - I've found the ssh key works best you do it once for a system and never have to enter a password for git again so I definitely recommend link from Jorge for the ssh key it should have instructions for doing this on a mac