0

I have python 2.7.8 installed as well as the following libraries:

colormath (2.1.0)
numpy (1.9.1)
Pillow (2.7.0)
pip (6.0.8)
setuptools (12.2)
wheel (0.24.0)

I've been trying to install networkx using pip install networkx and the following appears:

Collecting networkx
  Downloading networkx-1.9.1-py2.py3-none-any.whl (1.2MB)
    100% |################################| 1.2MB 248kB/s 
Collecting decorator>=3.4.0 (from networkx)
  Downloading decorator-3.4.2.tar.gz
Installing collected packages: decorator, networkx
  Running setup.py install for decorator
    error: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/decorator.py'
    Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/var/folders/yg/s23bxwb54hx616wzy9gdp6mw0000gn/T/pip-build-F5QMoF/decorator/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/yg/s23bxwb54hx616wzy9gdp6mw0000gn/T/pip-yHW55Y-record/install-record.txt --single-version-externally-managed --compile:
    running install

    running build

    running build_py

    creating build

    creating build/lib

    copying src/decorator.py -> build/lib

    running install_lib

    copying build/lib/decorator.py -> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

    error: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/decorator.py'

    ----------------------------------------
    Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/var/folders/yg/s23bxwb54hx616wzy9gdp6mw0000gn/T/pip-build-F5QMoF/decorator/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/yg/s23bxwb54hx616wzy9gdp6mw0000gn/T/pip-yHW55Y-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/yg/s23bxwb54hx616wzy9gdp6mw0000gn/T/pip-build-F5QMoF/decorator

I'm not really sure what to do.

Michał Trybus
  • 11,526
  • 3
  • 30
  • 42
tds
  • 13
  • 3
  • Get to super user mode! It will work. (If linux use sudo else if windows use admin prompt) – Bhargav Rao Jun 10 '15 at 17:54
  • 2
    run `sudo pip install ...` – Joran Beasley Jun 10 '15 at 17:54
  • @JoranBeasley: sudo pip install is strongly discouraged as it usually is not what the author wants and will make a mess of your computer. Please read official Python package installation documentation and see how to create virtual environments: https://packaging.python.org/en/latest/installing.html – Mikko Ohtamaa Jun 10 '15 at 18:57
  • I know how to create virtualenv ... but that is beyond the scope of what the OP is asking for here really ... – Joran Beasley Jun 10 '15 at 19:04

0 Answers0