Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install on Mac #64

Closed
skepley opened this issue Feb 22, 2019 · 5 comments
Closed

Unable to install on Mac #64

skepley opened this issue Feb 22, 2019 · 5 comments
Labels
Xcode update Installation issue on Mac due to older Xcode command line tools

Comments

@skepley
Copy link

skepley commented Feb 22, 2019

I am trying to install ripser and I get the following error. I have looked at similar threads here but these fixes don't seem to help. The error message is the following.

Collecting ripser
  Using cached https://files.pythonhosted.org/packages/8c/52/ca457da871708a169a0042d955f31f55caa060d1846f3de72b538724ef50/ripser-0.3.2.tar.gz
Requirement already satisfied: Cython in /anaconda3/lib/python3.6/site-packages (from ripser) (0.27.3)
Requirement already satisfied: numpy in /anaconda3/lib/python3.6/site-packages (from ripser) (1.14.0)
Requirement already satisfied: scipy in /anaconda3/lib/python3.6/site-packages (from ripser) (1.0.0)
Requirement already satisfied: scikit-learn in /anaconda3/lib/python3.6/site-packages (from ripser) (0.19.1)
Requirement already satisfied: persim in /anaconda3/lib/python3.6/site-packages (from ripser) (0.0.8)
Requirement already satisfied: matplotlib in /anaconda3/lib/python3.6/site-packages (from persim->ripser) (2.1.2)
Requirement already satisfied: hopcroftkarp in /anaconda3/lib/python3.6/site-packages (from persim->ripser) (1.2.4)
Requirement already satisfied: six>=1.10 in /anaconda3/lib/python3.6/site-packages (from matplotlib->persim->ripser) (1.11.0)
Requirement already satisfied: python-dateutil>=2.1 in /anaconda3/lib/python3.6/site-packages (from matplotlib->persim->ripser) (2.6.1)
Requirement already satisfied: pytz in /anaconda3/lib/python3.6/site-packages (from matplotlib->persim->ripser) (2017.3)
Requirement already satisfied: cycler>=0.10 in /anaconda3/lib/python3.6/site-packages (from matplotlib->persim->ripser) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /anaconda3/lib/python3.6/site-packages (from matplotlib->persim->ripser) (2.2.0)
Building wheels for collected packages: ripser
  Building wheel for ripser (setup.py) ... error
  Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/x8/54zby91n1sxc7qkgbl9x7jl00000gp/T/pip-install-ur6l9u3i/ripser/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/x8/54zby91n1sxc7qkgbl9x7jl00000gp/T/pip-wheel-2llctf8k --python-tag cp36:
  Warning: Extension name 'pyRipser' does not match fully qualified name 'ripser.pyRipser' of 'ripser/pyRipser.pyx'
  /anaconda3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.7-x86_64-3.6
  creating build/lib.macosx-10.7-x86_64-3.6/ripser
  copying ripser/_version.py -> build/lib.macosx-10.7-x86_64-3.6/ripser
  copying ripser/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/ripser
  copying ripser/ripser.py -> build/lib.macosx-10.7-x86_64-3.6/ripser
  running build_ext
  building 'pyRipser' extension
  creating build/temp.macosx-10.7-x86_64-3.6
  creating build/temp.macosx-10.7-x86_64-3.6/ripser
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -DUSE_COEFFICIENTS=1 -DNDEBUG=1 -DASSEMBLE_REDUCTION_MATRIX=1 -I./ripser -I/anaconda3/include/python3.6m -I/anaconda3/lib/python3.6/site-packages/numpy/core/include -c ripser/pyRipser.cpp -o build/temp.macosx-10.7-x86_64-3.6/ripser/pyRipser.o -Ofast -D_hypot=hypot -std=c++11 -mmacosx-version-min=10.9
  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
  
  ----------------------------------------
  Failed building wheel for ripser
  Running setup.py clean for ripser
Failed to build ripser
Installing collected packages: ripser
  Running setup.py install for ripser ... error
    Complete output from command /anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/x8/54zby91n1sxc7qkgbl9x7jl00000gp/T/pip-install-ur6l9u3i/ripser/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/x8/54zby91n1sxc7qkgbl9x7jl00000gp/T/pip-record-q8rku06t/install-record.txt --single-version-externally-managed --compile:
    Warning: Extension name 'pyRipser' does not match fully qualified name 'ripser.pyRipser' of 'ripser/pyRipser.pyx'
    /anaconda3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.7-x86_64-3.6
    creating build/lib.macosx-10.7-x86_64-3.6/ripser
    copying ripser/_version.py -> build/lib.macosx-10.7-x86_64-3.6/ripser
    copying ripser/__init__.py -> build/lib.macosx-10.7-x86_64-3.6/ripser
    copying ripser/ripser.py -> build/lib.macosx-10.7-x86_64-3.6/ripser
    running build_ext
    building 'pyRipser' extension
    creating build/temp.macosx-10.7-x86_64-3.6
    creating build/temp.macosx-10.7-x86_64-3.6/ripser
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/include -arch x86_64 -I/anaconda3/include -arch x86_64 -DUSE_COEFFICIENTS=1 -DNDEBUG=1 -DASSEMBLE_REDUCTION_MATRIX=1 -I./ripser -I/anaconda3/include/python3.6m -I/anaconda3/lib/python3.6/site-packages/numpy/core/include -c ripser/pyRipser.cpp -o build/temp.macosx-10.7-x86_64-3.6/ripser/pyRipser.o -Ofast -D_hypot=hypot -std=c++11 -mmacosx-version-min=10.9
    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
    
    ----------------------------------------
Command "/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/x8/54zby91n1sxc7qkgbl9x7jl00000gp/T/pip-install-ur6l9u3i/ripser/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/x8/54zby91n1sxc7qkgbl9x7jl00000gp/T/pip-record-q8rku06t/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/x8/54zby91n1sxc7qkgbl9x7jl00000gp/T/pip-install-ur6l9u3i/ripser/```
@sauln
Copy link
Member

sauln commented Feb 22, 2019

Hi, we’ve been having trouble supporting macoxs-10.7. Have you tried using the Python from home brew?

@skepley
Copy link
Author

skepley commented Feb 22, 2019

Thanks for replying. I finally was able to sort it out. The problem was due to command line tools as someone else mentioned in another thread. However, it didn't seem the other solution resolved it. I finally got it working by reinstalling xcode. Hopefully this helps anyone else having the same issue.

@sauln
Copy link
Member

sauln commented Feb 25, 2019

Glad your issue got resolved. Just to be clear, updating the command line tools worked with your anaconda installation?

Could you briefly describe how you updated your command line tools so we could add a note in the documentation?

Thank you.

@skepley
Copy link
Author

skepley commented Feb 25, 2019

According to a post I found on stack exchange, the problem had to do with some license agreement which needed to be formally accepted and was somehow not prompting when trying to update command line tools. The thread recommend reinstalling xcode via
xcode-select --install
I did indeed get a prompt to accept a license agreement and after this it worked. Hope this helps.

@sauln
Copy link
Member

sauln commented Feb 25, 2019

Thank you!

@sauln sauln closed this as completed Feb 25, 2019
@sauln sauln added the Xcode update Installation issue on Mac due to older Xcode command line tools label Mar 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Xcode update Installation issue on Mac due to older Xcode command line tools
Projects
None yet
Development

No branches or pull requests

2 participants