Perché Pip non ha installato Conda in El-Capitan?

1

Sistema: El Capitan OS X 10.11.5, Python 2.7.11.

Sto cercando di installare Python 3.x nel mio IPython Notebook seguendo la discussione qui . Eseguo pip install conda dove conda, ad esempio, Anaconda ma ottengo

Collecting conda
  Downloading conda-4.0.7.tar.gz (126kB)
    100% |████████████████████████████████| 133kB 499kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/yl/_jvx2hyx6xjg5vg3jzf_534w0000gp/T/pip-build-OfSRsc/conda/setup.py", line 30, in <module>
        import auxlib  # a build-time dependency only
    ImportError: No module named auxlib

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/yl/_jvx2hyx6xjg5vg3jzf_534w0000gp/T/pip-build-OfSRsc/conda/

Posso installare conda che è anaconda dal programma di installazione grafico nella loro home page. Tuttavia, mi piacerebbe capire perché pip fallisce come fa.

Simulazione dello stesso problema in Ubuntu 14.10

Ottengo lo stesso messaggio di errore in Ubuntu. Faccio pip install auxlib ma ottengo

    Downloading/unpacking auxlib
      Downloading auxlib-0.0.37-py2.py3-none-any.whl (89kB): 89kB downloaded
    Downloading/unpacking enum34 (from auxlib)
      Downloading enum34-1.1.6-py2-none-any.whl
    Installing collected packages: auxlib, enum34
    Cleaning up...
    Exception:
    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
        status = self.run(options, args)
      File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run
        requirement_set.install(install_options, global_options, root=options.root_path)
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install
        requirement.install(install_options, global_options, *args, **kwargs)
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 672, in install
        self.move_wheel_files(self.source_dir, root=root)
      File "/usr/lib/python2.7/dist-packages/pip/req.py", line 902, in move_wheel_files
        pycompile=self.pycompile,
      File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 206, in move_wheel_files
        clobber(source, lib_dir, True)
      File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 193, in clobber
        os.makedirs(destsubdir)
      File "/usr/lib/python2.7/os.py", line 157, in makedirs
        mkdir(name, mode)
    OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/auxlib'

    Storing debug log for failure in /home/masi/.pip/pip.log

Questo deve essere un problema di gruppo. Non dovresti eseguire la cosa con sudo . Penso che masi dovrebbe essere aggiunto al gruppo staff .     Faccio sudo usermod -a -G staff masi perché l'utente esiste già e voglio modificarlo solo, ma ottengo lo stesso errore

Installing collected packages: auxlib, enum34
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
...

Il file /home/masi/.pip/pip.log contiene

...
simple/enum34/), version: 1.1.0
    Found link https://pypi.python.org/packages/f3/3e/63a48338bd274ea06fd64b1c54a578a63c6ed81ca8052199560fdaced4b9/enum34-0.9.20.tar.gz#md5=b2ba91deeb2ca74eb47a90966914ead7 (from https://pypi.python.org/simple/enum34/), version: 0.9.20
    Found link https://pypi.python.org/packages/f5/1d/7913c47f6e3a5c3aaa727e2d5c4b26f6e0a4bdf44dc3a3f840f4e9bfb3bf/enum34-1.0.2.zip#md5=1af43de52f10404e5f93aacc58c53512 (from https://pypi.python.org/simple/enum34/), version: 1.0.2
    Found link https://pypi.python.org/packages/fd/eb/be9470809e1c56b92f37f9abf547bccde3360fec591d2a1bb1dd86daabca/enum34-0.9.22.tar.gz#md5=fcbea288974e0af1fb4f4b20c9bd1af7 (from https://pypi.python.org/simple/enum34/), version: 0.9.22
    Found link https://pypi.python.org/packages/fe/1e/1a261186fd2d14a443cb38a415660055e8a8805a88923d9512edbd5c7977/enum34-0.9.19.tar.gz#md5=efb6a497f51e480ed356e976d0369cb3 (from https://pypi.python.org/simple/enum34/), version: 0.9.19
  Using version 1.1.6 (newest of versions: 1.1.6, 1.1.6, 1.1.6, 1.1.5, 1.1.5, 1.1.5, 1.1.4, 1.1.4, 1.1.4, 1.1.3, 1.1.3, 1.1.3, 1.1.2, 1.1.2, 1.1.1, 1.1.1, 1.1.0, 1.1.0, 1.0.4, 1.0.4, 1.0.3, 1.0.3, 1.0.2, 1.0.2, 1.0.1, 1.0.1, 1.0, 1.0, 0.9.23, 0.9.23, 0.9.22, 0.9.22, 0.9.21, 0.9.21, 0.9.20, 0.9.20, 0.9.19, 0.9.18, 0.9.17, 0.9.16, 0.9.15, 0.9.14, 0.9.13, 0.9.12, 0.9.11, 0.9.1, 0.9, 0.9)
  Downloading enum34-1.1.6-py2-none-any.whl
  Downloading from URL https://pypi.python.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl#md5=68f6982cc07dde78f4b500db829860bd (from https://pypi.python.org/simple/enum34/)
Installing collected packages: auxlib, enum34
Cleaning up...
  Removing temporary dir /tmp/pip_build_masi...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 672, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 902, in move_wheel_files
    pycompile=self.pycompile,
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 206, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 193, in clobber
    os.makedirs(destsubdir)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/auxlib'

Auxlib con sudo ma

Penso che l'unico modo per risolvere il problema sia eseguire

sudo pip install auxlib

che ha successo. Eseguo ora sudo pip install conda , ma ora ho

Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pycosat/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-id6_uB-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pycosat
Storing debug log for failure in /home/masi/.pip/pip.log

Ho installato python-setuptools correttamente, quindi l'errore non ha senso. Il file /home/masi/.pip/pip.log ha

running build_ext
building 'pycosat' extension
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPYCOSAT_VERSION="0.6.1" -I/usr/include/python2.7 -c pycosat.c -o build/temp.linux-x86_64-2.7/pycosat.o
pycosat.c:9:20: fatal error: Python.h: No such file or directory
 #include <Python.h>
                    ^
compilation terminated.

   error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pycosat/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-id6_uB-record/install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

copying test_pycosat.py -> build/lib.linux-x86_64-2.7

running build_ext

building 'pycosat' extension

creating build/temp.linux-x86_64-2.7

x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPYCOSAT_VERSION="0.6.1" -I/usr/include/python2.7 -c pycosat.c -o build/temp.linux-x86_64-2.7/pycosat.o

pycosat.c:9:20: fatal error: Python.h: No such file or directory

 #include <Python.h>

                    ^

compilation terminated.

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
  Removing temporary dir /tmp/pip_build_root...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pycosat/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-id6_uB-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pycosat
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1436, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 707, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 715, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pycosat/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-id6_uB-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pycosat

... TODO qui

Il loro pacchetto .sh è senza speranza

Installare il loro pacchetto .sh che è pensato per Linux è immaturo

sudo -H sh ./Anaconda3-4.0.0-Linux-x86_64.sh 
./Anaconda3-4.0.0-Linux-x86_64.sh: 15: ./Anaconda3-4.0.0-Linux-x86_64.sh: 0: not found
./Anaconda3-4.0.0-Linux-x86_64.sh: 65: ./Anaconda3-4.0.0-Linux-x86_64.sh: Syntax error: word unexpected (expecting ")")

che fornisce anche un errore di sintassi in Ubuntu 14.10 64 bit.

Perché Pip non sta installando Conda / Anaconda in El-Capitan?

    
posta Léo Léopold Hertz 준영 28.05.2016 - 18:41
fonte

0 risposte

Leggi altre domande sui tag