python-3.x - 安装 github 子模块时,诗歌安装失败并显示 [CalledProcessError]

标签 python-3.x pip python-poetry

我是 python 和 github 的新手。当我尝试安装一些子模块时出现以下错误。

  • 我在 Windows 上使用 git bash
  • pip 最新版本为 20.2.3。
  • 能够使用poetry成功安装其他子模块
    $ poetry install -vvv
    Using virtualenv: E:\Dev\venv\venv_test
    Installing dependencies from lock file
    
    [CalledProcessError]
    Command '['C:\\Users\\88810\\AppData\\Local\\Temp\\tziwqwewd56\\Scripts\\python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 3221226505.
    
    Traceback (most recent call last):
      File "C:\Users\88810\.poetry\lib\poetry\_vendor\py3.6\clikit\console_application.py", line 131, in run
        status_code = command.handle(parsed_args, io)
      File "C:\Users\88810\.poetry\lib\poetry\_vendor\py3.6\clikit\api\command\command.py", line 120, in handle
        status_code = self._do_handle(args, io)
      File "C:\Users\88810\.poetry\lib\poetry\_vendor\py3.6\clikit\api\command\command.py", line 171, in _do_handle
        return getattr(handler, handler_method)(args, io, self)
      File "C:\Users\88810\.poetry\lib\poetry\_vendor\py3.6\cleo\commands\command.py", line 92, in wrap_handle
        return self.handle()
      File "C:\Users\88810\.poetry\lib\poetry\console\commands\install.py", line 69, in handle
        return_code = installer.run()
      File "C:\Users\88810\.poetry\lib\poetry\installation\installer.py", line 74, in run
        self._do_install(local_repo)
      File "C:\Users\88810\.poetry\lib\poetry\installation\installer.py", line 225, in _do_install
        ops = solver.solve(use_latest=whitelist)
      File "C:\Users\88810\.poetry\lib\poetry\puzzle\solver.py", line 36, in solve
        packages, depths = self._solve(use_latest=use_latest)
      File "C:\Users\88810\.poetry\lib\poetry\puzzle\solver.py", line 181, in _solve
        self._package, self._provider, locked=locked, use_latest=use_latest
      File "C:\Users\88810\.poetry\lib\poetry\mixology\__init__.py", line 7, in resolve_version
        return solver.solve()
      File "C:\Users\88810\.poetry\lib\poetry\mixology\version_solver.py", line 80, in solve
        next = self._choose_package_version()
      File "C:\Users\88810\.poetry\lib\poetry\mixology\version_solver.py", line 388, in _choose_package_version
        version = self._provider.complete_package(version)
      File "C:\Users\88810\.poetry\lib\poetry\puzzle\provider.py", line 601, in complete_package
        self.search_for_vcs(r)
      File "C:\Users\88810\.poetry\lib\poetry\puzzle\provider.py", line 175, in search_for_vcs
        name=dependency.name,
      File "C:\Users\88810\.poetry\lib\poetry\puzzle\provider.py", line 213, in get_package_from_vcs
        package = cls.get_package_from_directory(tmp_dir, name=name)
      File "C:\Users\88810\.poetry\lib\poetry\puzzle\provider.py", line 361, in get_package_from_directory
        cls._execute_setup()
      File "C:\Users\88810\.poetry\lib\poetry\puzzle\provider.py", line 872, in _execute_setup
        EnvManager.build_venv(tmp_dir)
      File "C:\Users\88810\.poetry\lib\poetry\utils\env.py", line 688, in build_venv
        builder.create(str(path))
      File "E:\python36\lib\venv\__init__.py", line 67, in create
        self._setup_pip(context)
      File "E:\python36\lib\venv\__init__.py", line 245, in _setup_pip
        subprocess.check_output(cmd, stderr=subprocess.STDOUT)
      File "E:\python36\lib\subprocess.py", line 336, in check_output
        **kwargs).stdout
      File "C:\Users\88810\.poetry\lib\poetry\utils\_compat.py", line 206, in run
        retcode, process.args, output=stdout, stderr=stderr
    
    (venv_test)

最佳答案

按照以下步骤我能够解决问题:

  1. 将 python 3.6 升级到 3.7.4。
  2. 我之前把python安装在E盘,安装在C盘。

关于python-3.x - 安装 github 子模块时,诗歌安装失败并显示 [CalledProcessError],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63872721/

相关文章:

Python unittest 在单个套接字的 tcp 服务器上进行多个测试

python - 在字符串中获取 dis.dis() 的结果

cython - 诗歌+狮身人面像+Cython

python - 在哪里可以找到使用诗歌安装的虚拟环境 |哪里可以找到诗装虚拟环境

python-3.x - Python3 字典比较,带有 numpy 数组的嵌套字典

python - 如何使用 python 从 csv 文件中读取特定范围的行?

python - 无法让 matplotlib 使用简单绘图的代码

python - 安装软件包时“pip”无法识别命令

python-3.x - 如何让 Pip 在 Ubuntu 12.04 上使用 Python3

python-poetry - 诗歌 : how to adjust parallel config?