Poetry fails to install idna-ssl dependency with Wine: "ValueError: illegal environment variable name"
See original GitHub issueThe context is similar to issue #147 (Wine on Linux), but I get a different error, when having no virtualenv enabled (the cause of #147), and when installing a particular package, idna-ssl
:
Creating virtualenv whatever-py3.6 in C:\users\desbma\Local Settings\Application Data\pypoetry\Cache\virtualenvs
Using virtualenv: C:\users\desbma\Local Settings\Application Data\pypoetry\Cache\virtualenvs\whatever-py3.6
Updating dependencies
Resolving dependencies... (0.8s)
Package operations: 2 installs, 0 updates, 0 removals
Writing lock file
- Installing idna (2.6)
- Installing idna-ssl (1.0.1)
[VenvCommandError]
Command ['pip', 'install', '--no-deps', '-r', 'C:\\users\\desbma\\Temp\\idna
-ssl-1.0.1mbmbbw6xreqs.txt'] errored with the following output:
Collecting idna-ssl==1.0.1 (from -r C:\users\desbma\Temp\idna-ssl-1.0.1mbmbb
w6xreqs.txt (line 1))
Downloading https://files.pythonhosted.org/packages/c4/3b/facf5a5009e577e7
764e68a2af5ee25c63f41c78277260c2c42b8cfabf2e/idna-ssl-1.0.1.tar.gz
Error illegal environment variable name while executing command python s
etup.py egg_info
Exception:
Traceback (most recent call last):
File "c:\users\desbma\local settings\application data\pypoetry\Cache\virtu
alenvs\whatever-py3.6\lib\site-packages\pip\basecommand.py", line 215, in ma
in
status = self.run(options, args)
File "c:\users\desbma\local settings\application data\pypoetry\Cache\virtu
alenvs\whatever-py3.6\lib\site-packages\pip\commands\install.py", line 324,
in run
requirement_set.prepare_files(finder)
File "c:\users\desbma\local settings\application data\pypoetry\Cache\virtu
alenvs\whatever-py3.6\lib\site-packages\pip\req\req_set.py", line 380, in pr
epare_files
ignore_dependencies=self.ignore_dependencies))
File "c:\users\desbma\local settings\application data\pypoetry\Cache\virtu
alenvs\whatever-py3.6\lib\site-packages\pip\req\req_set.py", line 634, in _p
repare_file
abstract_dist.prep_for_dist()
File "c:\users\desbma\local settings\application data\pypoetry\Cache\virtu
alenvs\whatever-py3.6\lib\site-packages\pip\req\req_set.py", line 129, in pr
ep_for_dist
self.req_to_install.run_egg_info()
File "c:\users\desbma\local settings\application data\pypoetry\Cache\virtu
alenvs\whatever-py3.6\lib\site-packages\pip\req\req_install.py", line 439, i
n run_egg_info
command_desc='python setup.py egg_info')
File "c:\users\desbma\local settings\application data\pypoetry\Cache\virtu
alenvs\whatever-py3.6\lib\site-packages\pip\utils\__init__.py", line 667, in
call_subprocess
cwd=cwd, env=env)
File "c:\Python36\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "c:\Python36\lib\subprocess.py", line 997, in _execute_child
startupinfo)
ValueError: illegal environment variable name
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip'
command.
Exception trace:
c:\Python36\lib\site-packages\poetry\_vendor\cleo\application.py in run() at line 94
status_code = self.do_run(input_, output_)
c:\Python36\lib\site-packages\poetry\console\application.py in do_run() at line 86
return super(Application, self).do_run(i, o)
c:\Python36\lib\site-packages\poetry\_vendor\cleo\application.py in do_run() at line 197
status_code = command.run(input_, output_)
c:\Python36\lib\site-packages\poetry\console\commands\command.py in run() at line 77
return super(BaseCommand, self).run(i, o)
c:\Python36\lib\site-packages\poetry\_vendor\cleo\commands\base_command.py in run() at line 146
status_code = self.execute(input_, output_)
c:\Python36\lib\site-packages\poetry\_vendor\cleo\commands\command.py in execute() at line 107
return self.handle()
c:\Python36\lib\site-packages\poetry\console\commands\install.py in handle() at line 52
return installer.run()
c:\Python36\lib\site-packages\poetry\installation\installer.py in run() at line 75
self._do_install(local_repo)
c:\Python36\lib\site-packages\poetry\installation\installer.py in _do_install() at line 257
self._execute(op)
c:\Python36\lib\site-packages\poetry\installation\installer.py in _execute() at line 265
getattr(self, '_execute_{}'.format(method))(operation)
c:\Python36\lib\site-packages\poetry\installation\installer.py in _execute_install() at line 291
self._installer.install(operation.package)
c:\Python36\lib\site-packages\poetry\installation\pip_installer.py in install() at line 38
self.run(*args)
c:\Python36\lib\site-packages\poetry\installation\pip_installer.py in run() at line 63
return self._venv.run('pip', *args, **kwargs)
c:\Python36\lib\site-packages\poetry\utils\venv.py in run() at line 279
raise VenvCommandError(e)
install [--no-dev] [--dry-run] [-E|--extras EXTRAS] [--develop DEVELOP]
Standalone script to reproduce: https://pastebin.com/raw/UNu9JL8g
The same dependency gets installed normally using Poetry on Linux, or pip on Wine.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Poetry fails to install idna-ssl dependency with Wine ... - GitHub
ValueError: illegal environment variable name indicates that there is something wrong in one of your environment variables.
Read more >How can I make my project available in the poetry environment?
This will install all dependencies and install the projects package in editable mode as well in a virtual environment. Don't forget to activate ......
Read more >Dependency Management With Python Poetry
Start a new Poetry project; Add Poetry to an existing project; Use the pyproject.toml file; Pin dependencies; Install dependencies with poetry.
Read more >The pyproject.toml file | Documentation | Poetry
The pyproject.toml file The tool.poetry section of the pyproject.toml file is composed of multiple sections. name The name of the package.
Read more >Poetry: Finally an all-in-one tool to manage Python packages
If you are new in python programming and don't know how to manage your project dependencies, then this tutorial is for you.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe this is just my setup, but I seem to have an env var whose name is an empty string
I added the line
env.pop('')
to~/.wine/drive_c/Python27/Lib/site-packages/pip/_internal/utils/misc.py
after:
And pip seems to get quite a bit further for my own library, it might help here too.
Apologies for the noise, came across this through googling, should have read your env vars.