无法安装任何东西

时间:2020-10-15 11:15:42

标签: python

我是python的新手,下载后我尝试下载一些软件包,但它们都给出了很长的错误:

pip install pandas

Collecting pandas
  Using cached pandas-1.1.3.tar.gz (5.2 MB)
  Installing build dependencies ... error

ERROR: Command errored out with exit status 1:
   command: 'c:\users\turqay\appdata\local\programs\python\python39\python.exe' 'c:\users\turqay\appdata\local\programs\python\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Turqay\AppData\Local\Temp\pip-build-env-a8k3gf7x\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.21,<3' 'numpy==1.15.4; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.15.4; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"''
       cwd: None
  Complete output (326 lines):
  Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment
  Collecting setuptools
    Using cached setuptools-50.3.1-py3-none-any.whl (785 kB)
  Collecting wheel
    Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
  Collecting Cython<3,>=0.29.21
    Using cached Cython-0.29.21-py2.py3-none-any.whl (974 kB)
  Collecting numpy==1.17.3
    Using cached numpy-1.17.3.zip (6.4 MB)
  Using legacy 'setup.py install' for numpy, since package 'wheel' is not installed.     
  Installing collected packages: setuptools, wheel, Cython, numpy
      Running setup.py install for numpy: started
      Running setup.py install for numpy: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: 'c:\users\turqay\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Turqay\\AppData\\Local\\Temp\\pip-install-67q7i3xi\\numpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\Turqay\\AppData\\Local\\Temp\\pip-install-67q7i3xi\\numpy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Turqay\AppData\Local\Temp\pip-record-f_ldxfuf\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\Turqay\AppData\Local\Temp\pip-build-env-a8k3gf7x\overlay' --compile --install-headers 'C:\Users\Turqay\AppData\Local\Temp\pip-build-env-a8k3gf7x\overlay\Include\numpy'
           cwd: C:\Users\Turqay\AppData\Local\Temp\pip-install-67q7i3xi\numpy\
      Complete output (303 lines):
      Running from numpy source directory.

      Note: if you need reliable uninstall behavior, then install
      with pip instead of using `setup.py install`:

        - `pip install .`       (from a git repo or downloaded source
                                 release)
        - `pip install numpy`   (last NumPy release on PyPi)


      blas_opt_info:
      blas_mkl_info:
      No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
      customize MSVCCompiler
        libraries mkl_rt not found in ['c:\\users\\turqay\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\turqay\\appdata\\local\\programs\\python\\python39\\libs']
        NOT AVAILABLE

      blis_info:
      No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
      customize MSVCCompiler
        libraries blis not found in ['c:\\users\\turqay\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\turqay\\appdata\\local\\programs\\python\\python39\\libs']
        NOT AVAILABLE

      

它一直不可用,有时与pg_config executable not found一起使用,我在python 3.9和Windows 10上运行,我尝试了其他一些堆栈溢出问题解决方案,但它们都适用于Windows。

编辑:我安装了测试pip和networkx,错误针对的是熊猫和matplotlib

1 个答案:

答案 0 :(得分:0)

您可以尝试安装较低版本的Python,例如Python 3.8或Python 3.7吗?

如果您仍想继续使用Python 3.9,则需要安装两个Visual Studio dist软件包:

  1. 下载Visual C ++ Build Tools安装程序并从此处安装:http://go.microsoft.com/fwlink/?LinkId=691126&fixForIE=.exe
  2. 转到此链接并下载设置并安装Visual Studio 2015的Visual C ++ Redistributable:https://www.microsoft.com/en-in/download/details.aspx?id=48145

尝试再次安装所需的软件包。