Poetry: [EnvCommand] when running poetry install/update/add

Created on 25 Jul 2019  路  2Comments  路  Source: python-poetry/poetry

  • [x] I am on the latest Poetry version.
  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

Poetry always throws me [EnvCommandError] whenever I try to modify the file through poetry shell

Here's the stacktrace

[EnvCommandError]
Command ['C:\\Users\\Windows 7\\Desktop\\Julz Folder\\Work\\Capless\\dms-paperworks\\.venv\\Scripts\\python.exe', '-    
'] errored with the following return code 101, and output:
Unable to create process using 'C:\Users\Windows 7\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\Windows 7\.poetry\lib\poetry\_vendor\py3.7\cleo\application.py in run() at line 94
   status_code = self.do_run(input_, output_)
 C:\Users\Windows 7\.poetry\lib\poetry\console\application.py in do_run() at line 88
   return super(Application, self).do_run(i, o)
 C:\Users\Windows 7\.poetry\lib\poetry\_vendor\py3.7\cleo\application.py in do_run() at line 197
   status_code = command.run(input_, output_)
 C:\Users\Windows 7\.poetry\lib\poetry\console\commands\command.py in run() at line 77
   return super(BaseCommand, self).run(i, o)
 C:\Users\Windows 7\.poetry\lib\poetry\_vendor\py3.7\cleo\commands\base_command.py in run() at line 136
   self.initialize(input_, output_)
 C:\Users\Windows 7\.poetry\lib\poetry\console\commands\env_command.py in initialize() at line 18
   current_env = Env.get(self.poetry.file.parent)
 C:\Users\Windows 7\.poetry\lib\poetry\utils\env.py in get() at line 194
   return VirtualEnv(venv)
 C:\Users\Windows 7\.poetry\lib\poetry\utils\env.py in __init__() at line 483
   self._base = Path(self.run("python", "-", input_=GET_BASE_PREFIX).strip())
 C:\Users\Windows 7\.poetry\lib\poetry\utils\env.py in run() at line 539
   return super(VirtualEnv, self).run(bin, *args, **kwargs)
 C:\Users\Windows 7\.poetry\lib\poetry\utils\env.py in run() at line 388
   raise EnvCommandError(e, input=input_)

update [--no-dev] [--dry-run] [--lock] [--] [<packages>]...

Most helpful comment

where is the resolution?

All 2 comments

where is the resolution?

Reinstall python with "install for all users" option.

https://stackoverflow.com/a/62207756

Was this page helpful?
0 / 5 - 0 ratings

Related issues

etijskens picture etijskens  路  3Comments

mozartilize picture mozartilize  路  3Comments

Euphorbium picture Euphorbium  路  3Comments

thmo picture thmo  路  3Comments

ulope picture ulope  路  3Comments