繁体   English   中英

尝试安装 conda,如何修复“错误:命令错误,退出状态 1”和“错误:需要 Microsoft Visual C++ 14.0 或更高版本”

[英]Trying to install conda, how to fix "ERROR: Command errored out with exit status 1" and "error: Microsoft Visual C++ 14.0 or greater is required"

我尝试使用pip install conda conda 来安装 anaconda。 这是给出的错误消息:

pip install conda
Collecting conda
  Using cached conda-4.3.16.tar.gz (299 kB)
  Preparing metadata (setup.py) ... done
Collecting pycosat>=0.6.1
  Using cached pycosat-0.6.3.zip (66 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: requests>=2.12.4 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from conda) (2.27.0)
Collecting ruamel.yaml>=0.11.14
  Using cached ruamel.yaml-0.17.20-py3-none-any.whl (109 kB)
Collecting conda
  Using cached conda-4.3.13.tar.gz (370 kB)
  Preparing metadata (setup.py) ... done
  Using cached conda-4.2.7.tar.gz (235 kB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\User\AppData\Local\Programs\Python\Python39\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-lpu674zg\\conda_38e301b1427a4dfc932aafc1f9921e3d\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-lpu674zg\\conda_38e301b1427a4dfc932aafc1f9921e3d\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\User\AppData\Local\Temp\pip-pip-egg-info-g3umfz8o'
       cwd: C:\Users\User\AppData\Local\Temp\pip-install-lpu674zg\conda_38e301b1427a4dfc932aafc1f9921e3d\
  Complete output (5 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\User\AppData\Local\Temp\pip-install-lpu674zg\conda_38e301b1427a4dfc932aafc1f9921e3d\setup.py", line 32, in <module>
      from conda._vendor.auxlib import packaging  # NOQA
  ModuleNotFoundError: No module named 'auxlib'
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/76/7c/374bc72a16f71b51aaad570192438b9752604121dfea4cb0abc5d0b2c2ca/conda-4.2.7.tar.gz#sha256=cf8478ad3c1f00e7169c57873fb42832e86315d393619856a2e438dd781f782c (from https://pypi.org/simple/conda/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached conda-4.2.6.tar.gz (235 kB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\User\AppData\Local\Programs\Python\Python39\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-lpu674zg\\conda_842d005726d142e083f7b318f321d7d0\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-lpu674zg\\conda_842d005726d142e083f7b318f321d7d0\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\User\AppData\Local\Temp\pip-pip-egg-info-yk_c2080'
       cwd: C:\Users\User\AppData\Local\Temp\pip-install-lpu674zg\conda_842d005726d142e083f7b318f321d7d0\
  Complete output (5 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\User\AppData\Local\Temp\pip-install-lpu674zg\conda_842d005726d142e083f7b318f321d7d0\setup.py", line 32, in <module>
      from conda._vendor.auxlib import packaging  # NOQA
  ModuleNotFoundError: No module named 'auxlib'
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/59/06/75f07bcf14777c7b337c02d7458a80937ac0e12a81a9aef9a6b017c17018/conda-4.2.6.tar.gz#sha256=caaf6458c5197da0f4850d0ce133450ce192b9741324d9050f1a857bb0886ac5 (from https://pypi.org/simple/conda/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached conda-4.1.6.tar.gz (144 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: pyyaml in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from conda) (6.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from requests>=2.12.4->conda) (1.26.7)
Requirement already satisfied: idna<4,>=2.5 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from requests>=2.12.4->conda) (3.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from requests>=2.12.4->conda) (2.0.10)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\user\appdata\local\programs\python\python39\lib\site-packages (from requests>=2.12.4->conda) (2021.10.8)
Using legacy 'setup.py install' for conda, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pycosat, since package 'wheel' is not installed.
Installing collected packages: pycosat, conda
    Running setup.py install for pycosat ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\User\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-lpu674zg\\pycosat_1aebe1fe89f54b1493b9b1c81948719b\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-lpu674zg\\pycosat_1aebe1fe89f54b1493b9b1c81948719b\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\User\AppData\Local\Temp\pip-record-vv2inzom\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\User\AppData\Local\Programs\Python\Python39\Include\pycosat'
         cwd: C:\Users\User\AppData\Local\Temp\pip-install-lpu674zg\pycosat_1aebe1fe89f54b1493b9b1c81948719b\
    Complete output (9 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    copying test_pycosat.py -> build\lib.win-amd64-3.9
    running build_ext
    building 'pycosat' extension
    error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\User\AppData\Local\Programs\Python\Python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-lpu674zg\\pycosat_1aebe1fe89f54b1493b9b1c81948719b\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-lpu674zg\\pycosat_1aebe1fe89f54b1493b9b1c81948719b\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\User\AppData\Local\Temp\pip-record-vv2inzom\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\User\AppData\Local\Programs\Python\Python39\Include\pycosat' Check the logs for full command output.

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM