简体   繁体   English

命令出错,退出状态为 1

[英]Command errored out with exit status one

I am installing qark in my pc(Windows 7) for testing purpose.我正在我的电脑(Windows 7)中安装 qark 以进行测试。 I have installed python 3.7.2 and pip 19.2.3.我已经安装了 python 3.7.2 和 pip 19.2.3。 For next step, I have to install the requirement.txt file while installing, an error occurred(Command errored out with exit status 1:) full error I will give below.对于下一步,我必须在安装时安装requirement.txt 文件,发生错误(命令出错,退出状态为1 :) 完整错误我将在下面给出。

I tried installing it again but error was same I don't know what should I do.我尝试再次安装它但错误是一样的我不知道我该怎么办。 Help me.帮我。 Thank you谢谢

    ERROR: Command errored out with exit status 1:
     command: 'c:\users\hp\appdata\local\programs\python\python37\python.exe' -c
 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\HP\\AppData\\L
ocal\\Temp\\pip-install-6tjj0pbq\\cffi\\setup.py'"'"'; __file__='"'"'C:\\Users\\
HP\\AppData\\Local\\Temp\\pip-install-6tjj0pbq\\cffi\\setup.py'"'"';f=getattr(to
kenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"
'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --
egg-base pip-egg-info
         cwd: C:\Users\HP\AppData\Local\Temp\pip-install-6tjj0pbq\cffi\
    Complete output (27 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\HP\AppData\Local\Temp\pip-install-6tjj0pbq\cffi\setup.py",
line 120, in <module>
        if sys.platform == 'win32' and uses_msvc():
      File "C:\Users\HP\AppData\Local\Temp\pip-install-6tjj0pbq\cffi\setup.py",
line 98, in uses_msvc
        return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')

      File "c:\users\hp\appdata\local\programs\python\python37\lib\distutils\com
mand\config.py", line 227, in try_compile
        self._compile(body, headers, include_dirs, lang)
      File "c:\users\hp\appdata\local\programs\python\python37\lib\distutils\com
mand\config.py", line 133, in _compile
        self.compiler.compile([src], include_dirs=include_dirs)
      File "c:\users\hp\appdata\local\programs\python\python37\lib\distutils\_ms
vccompiler.py", line 345, in compile
        self.initialize()
      File "c:\users\hp\appdata\local\programs\python\python37\lib\distutils\_ms
vccompiler.py", line 238, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 185, in msvc14_get_vc_env
        return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
      File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 1228, in return_env
        self.OSIncludes,
      File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 963, in OSIncludes
        sdkver = self._sdk_subdir
      File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 1057, in _sdk_subdir
        ucrtver = self.si.WindowsSdkLastVersion
      File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 604, in WindowsSdkLastVersion
        self.WindowsSdkDir, 'lib'))
      File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 809, in _use_last_dir_name
        for dir_name in reversed(os.listdir(path))
    FileNotFoundError: [WinError 3] The system cannot find the path specified: '
C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\PlatformSDK\\lib'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check th
e logs for full command output.

I also had a similar problem in which the cmd/PowerShell told me that I was missing a version of Windows Visual C++, so I followed what was written on THIS site, so I didn't have this problem anymore (I also rebooted, for safety):我也有一个类似的问题,cmd/PowerShell 告诉我我缺少一个版本的 Windows Visual C++,所以我遵循了 这个网站上写的内容,所以我不再有这个问题了(我也重新启动了,因为安全):

  1. Install using any ONE of these choices:使用以下任一选项进行安装:
  2. Select: Workloads → C++ build tools.选择:工作负载 → C++ 构建工具。
  3. Install options: select only the “Windows 10 SDK” (assuming the computer is Windows 10).安装选项:只选择“Windows 10 SDK”(假设电脑是Windows 10)。 Optionally, if you want to use MSVC cl.exe C/C++ compiler from the command line, additionally select the C++ build tools, which takes an additional 2 GB disk space.或者,如果您想从命令行使用 MSVC cl.exe C/C++ 编译器,请另外选择 C++ 构建工具,这需要额外的 2 GB 磁盘空间。


Moreover, to avoid problems I preferred to install Python 2.7.13 or 3.6 because they are the ones with which it has been tested (as indicated by the requirements on the github page ).此外,为了避免出现问题,我更喜欢安装 Python 2.7.133.6,因为它们已经过测试(如github 页面上的要求所示)。

After which (again according to the instructions) I installed QARK using:之后(再次根据说明)我使用以下方法安装了 QARK:

pip install -r requirements.txt
pip install . --user


In the end, to make it work I had to put in the path of the environment variables these definitions: C:\\Users\\user\\AppData\\Roaming\\Python\\Scripts (if you are using Python 2.xx) C:\\Users\\utente\\AppData\\Roaming\\Python\\Python36\\Scripts (if you are using Python 3.xx)最后,为了使其工作,我必须将这些定义放在环境变量的路径中:C:\\Users\\user\\AppData\\Roaming\\Python\\Scripts(如果您使用的是 Python 2.xx)C:\\Users \\utente\\AppData\\Roaming\\Python\\Python36\\Scripts(如果您使用的是 Python 3.xx)

After that I didn't have any problems running it.之后,我运行它没有任何问题。
I hope I have been helpful!我希望我有所帮助! 🤞 🤞

I tried solutions above but still getting the error. 我尝试了上面的解决方案,但仍然收到错误。

Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. 命令错误,退出状态为1:python setup.py egg_info检查日志以获取完整的命令输出。

I'm new to python and would highly appreciate any help 我是python的新手,非常感谢您的帮助

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

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