Using pip to install modules in python failing

后端 未结 6 2167
被撕碎了的回忆
被撕碎了的回忆 2021-01-04 08:22

I\'m having trouble installing python modules using pip. Below is the output from the command window:

Note that I installed pip immediately before trying to install

相关标签:
6条回答
  • 2021-01-04 08:29

    This issue looks very similar to Python GDAL package missing header file when installing via pip which seems to have working solution.

    Usual problem with python libraries that have CPython extensions is explained here and solution is often:

    install library by downloading and running windows binary package.

    0 讨论(0)
  • 2021-01-04 08:35

    The easiest way (as suggested by J.F. Sebastian) is to install from http://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal

    0 讨论(0)
  • 2021-01-04 08:35

    The problem is that Python thinks to be installed on C:\Python\ but this is not true as it is inside portablepython directory. I resolved this using a link.

    For instance my portablepython directory (or kivy directory in example) is this:

    C:\Users\blabla.KMS\kivy-1.8.0-py3.3-win32\Python33
    

    enter dos prompt and type:

    mklink /d c:\Python33\ C:\Users\blabla.KMS\kivy-1.8.0-py3.3-win32\Python33\ 
    

    than you can go inside c:\Python33\Scripts and use PIP or easy_install finally you can delete the link using:

    rmdir Python33
    

    Cool! I installed Django on kivy!

    0 讨论(0)
  • 2021-01-04 08:37

    This isn't a Python problem, but an issue with the compilation of the sources on Windows.

    I assume that you followed the installation instructions and installed the GDAL binaries first, with the header files ?

    Moreover, you can check the answer to this SO question which points to a ubuntu forum that could help you.

    0 讨论(0)
  • 2021-01-04 08:46

    I ran into a similar problem when trying to install ipython without anaconda. First pip could not find 'cl.exe' when doing pip install jupyter and after adding to PATH, i got the failed with exit status 2 error.

    You could try playing around with VS files to get it to work, but the easiest way around it for me was to:

    1) Download the .tar.gz file from https://pypi.python.org/pypi 2) extract in a folder 3) run setup.py in the extracted folder from cmd:

    c:\> cd <wherever your extracted folder is from .tar.gz that contains setup.py>
    c:\<yourcdhere>>python setup.py install
    

    note if, like me, you don't have python in the PATH because you have python 32b and 64b for different things, you will have to point to python manually (change second command to):

    c:\<yourcdhere>>pythoninstallpath\python setup.py install
    

    and it will automatically copy the library and install all its dependencies in python install location under the appropriate lib folder.

    So that you can see how it worked, here it is for me. but change directories to match whatever you are using:

    i have the extracted folder with ipython's setup.py at "L:\python\py27_32b\ipython-5.3.0" and python installed at "L:\python\py27_32b\install"

    c:\users\vlox>L:
    L:\>cd "python\py27_32b\ipython-5.3.0"
    L:\python\py27_32b\ipython-5.3.0>L:\python\py27_32b\install\python setup.py install
    

    and voila!

    hope this helps

    0 讨论(0)
  • 2021-01-04 08:56

    I had the same problem, but i needed to install 'ebooklib' module, which is not in the list of modules at http://www.lfd.uci.edu/~gohlke/pythonlibs. At the same time i had this module downloaded. But installation with ebooklib's setup.py failed with error: command '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.ex e"' failed with exit status 2 Finnally, i've installed all the dependent modules separately, from lfd.uci.edu, and after that installing with setup.py was successfull.

    0 讨论(0)
提交回复
热议问题