Poetry on Windows 10 + pyenv-win is quickly corrupted
See original GitHub issue- I am on the latest Poetry version (reason below).
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: Windows 10 (10.0.18362 Build 18362), German locale
- Poetry version: 1.1.0b2
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/kiudee/96f414e3564023b5576137ddf761675c
Issue
I spent several days trying to install poetry on my Windows workstation (after already using it for months on my Linux PCs). After trying the following methods (which failed):
- Global python installation + PowerShell command
- pyenv-win + PowerShell command
- pyenv-win + pipx + poetry==1.0.10
I got poetry to work using:
- Uninstalling global python and removing entries from PATH
- Installing pyenv-win 2.64.1
- Installing python using
pyenv install 3.8.2
andpyenv global 3.8.2
- Installing pipx using
pip install pipx
- Correctly adding all directories to PATH
- Installing poetry using
pipx install poetry==1.1.0b2
(beta was required to get poetry to run - got the tip from another issue)
Running poetry install
on a project worked once, but broke when trying again on another project.
So what already fails then is the following:
- Create a new project using
poetry new blablub
poetry add tqdm
(or insert any other package here) fails with
Command C:\Users\Karlson\AppData\Local\pypoetry\Cache\virtualenvs\blablub-HgamxXlr-py3.8\Scripts\pip.exe install --no-deps file://C:\Users\Karlson\AppData\Local\pypoetry\Cache\artifacts\be\98\c7\69fe6fea7a59659af1c6260899226129565330b1e07c9c5b3769be76bf\six-1.15.0-py2.py3-none-any.whl errored with the following return code 1, and output:
Processing c:\users\karlson\appdata\local\pypoetry\cache\artifacts\be\98\c7\69fe6fea7a59659af1c6260899226129565330b1e07c9c5b3769be76bf\six-1.15.0-py2.py3-none-any.whl
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Karlson\AppData\Local\pypoetry\Cache\virtualenvs\blablub-HgamxXlr-py3.8\Scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Karlson\\AppData\\Local\\Temp\\pip-req-build-mm0i0yyu\\setup.py'"'"'; __file__='"'"'C:\\Users\\Karlson\\AppData\\Local\\Temp\\pip-req-build-mm0i0yyu\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Karlson\AppData\Local\Temp\pip-pip-egg-info-sly7kipr'
cwd: C:\Users\Karlson\AppData\Local\Temp\pip-req-build-mm0i0yyu\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\karlson\.pyenv\pyenv-win\versions\3.8.2\lib\tokenize.py", line 392, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Karlson\\AppData\\Local\\Temp\\pip-req-build-mm0i0yyu\\setup.py'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Gist with the full debug output: https://gist.github.com/kiudee/70df85a30c7caed4156fc490d2569d02
Installing the same package in the pyenv environment using pip install six
works perfectly fine.
Let me know if you need more information to debug the problem.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Bountysource
Poetry on Windows 10 + pyenv-win is quickly corrupted. ... Coming soon: A brand new website interface for an even better experience!
Read more >How to Set Up Pyenv and Poetry on Windows 10 for Python ...
Install Pyenv The first step is to open a Git terminal and download the pyenv-win project from Github. Restart your Git session and...
Read more >Ask HN: Why Poetry did not become a mainstream package ...
Personally, I use pipenv (manages package dependencies and sub-dependencies), pyenv (python version management), and pyenv-virtualenv ...
Read more >Python poetry install failure - invalid hashes - Stack Overflow
There are several issue reports about invalid hashes. One common cause is running multiple Poetry instances simultaneously; ...
Read more >Mastering Python - Second Edition - Packt
Creating environments using venv , pipenv , poetry , pyenv , and anaconda ... And for Windows cmd.exe (assuming python.exe is in your...
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 Free
Top 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
This is pretty annoying. I just deleted cache directory at least 20 times today during development. I would appreciate if this could be prioritized
I have a very similar experience when trying to let poetry work with multiple python versions on Windows. In my experience,
pyenv-win
andpoetry
do not play nicely so I dropped that option - instead, having several pythons installed in Windows through the standard python.org Windows installers, added only one to PATH. Now I experience the following:poetry env use
, as covered in issue #2698. This issue suggests using 1.1.0b2 instead.poetry env use