1

[EnvCommandError]每当我尝试添加一个包时,Python's Poetry 总是让我失望。当我尝试安装依赖项时也会出现同样的错误,即诗歌安装

请注意,

1)我安装poetry正确(使用他们网站上提供的 curl)

2)我正在尝试将诗歌与 Docker 集成,所以我计划将开发与 docker 完全隔离,而不是与任何其他虚拟环境(如果有“更好”的方法来做到这一点,请这样说)

3)我处于开发的第一阶段:设置。没有什么是真正具体的,我正在尝试首先组织我要使用的包,这是我得到的错误

初始化很好:

poetry init

它显示了交互式安装,但经过修改或任何形式的使用诗歌:

poetry add bs4

它返回给我:

[EnvCommandError]
Command ['C:\\Users\\username\\AppData\\Local\\pypoetry\\Cache\\virtualenvs\\muser-py3.7\\Scripts\\python.exe', '-'    
] errored with the following return code 101, and output:
Unable to create process using 'C:\Users\username\AppData\Local\Programs\Python\Python37\python.exe -'
input was : import sys
if hasattr(sys, "real_prefix"):
    print(sys.real_prefix)
elif hasattr(sys, "base_prefix"):
    print(sys.base_prefix)
else:
    print(sys.prefix)

Exception trace:
 C:\Users\username\.poetry\lib\poetry\_vendor\py3.7\cleo\application.py in run() at line 94
   status_code = self.do_run(input_, output_)
 C:\Users\username\.poetry\lib\poetry\console\application.py in do_run() at line 88
   return super(Application, self).do_run(i, o)
 C:\Users\username\.poetry\lib\poetry\_vendor\py3.7\cleo\application.py in do_run() at line 197
   status_code = command.run(input_, output_)
 C:\Users\username\.poetry\lib\poetry\console\commands\command.py in run() at line 77
   return super(BaseCommand, self).run(i, o)
 C:\Users\username\.poetry\lib\poetry\_vendor\py3.7\cleo\commands\base_command.py in run() at line 136
   self.initialize(input_, output_)
 C:\Users\username\.poetry\lib\poetry\console\commands\env_command.py in initialize() at line 33
   self.poetry.file.parent, o, self.poetry.package.name
 C:\Users\username\.poetry\lib\poetry\utils\env.py in create_venv() at line 298
   return VirtualEnv(venv)
 C:\Users\username\.poetry\lib\poetry\utils\env.py in __init__() at line 483
   self._base = Path(self.run("python", "-", input_=GET_BASE_PREFIX).strip())
 C:\Users\username\.poetry\lib\poetry\utils\env.py in run() at line 539
   return super(VirtualEnv, self).run(bin, *args, **kwargs)
 C:\Users\username\.poetry\lib\poetry\utils\env.py in run() at line 388
   raise EnvCommandError(e, input=input_)
4

0 回答 0