'poetry install' command fails; *.whl files are not found
Full error message
I am managing dependencies in my Python project via Poetry.
Now I want to run this project in a machine which is different from my dev machine. To install dependecies, I simply run this command from the root directory:
$ poetry install
but then it raises the following errors:
Updating dependencies
Resolving dependencies...
Writing lock file
Package operations: 70 installs, 0 updates, 0 removals
• Installing colorama (0.4.4)
• Installing tzdata (2021.1)
ValueError
File \C:\Users\tteguayco\AppData\Local\pypoetry\Cache\artifacts\9e\b3\11\7d87ac44fdb2d557301f1f4086a37c080d1482a98751abe7cdbabbad26\colorama-0.4.4-py2.py3-none-any.whl does not exist
at ~\AppData\Local\Programs\Python\Python39\lib\site-packages\poetry\core\packages\file_dependency.py:40 in __init__
36│ except FileNotFoundError:
37│ raise ValueError("Directory {} does not exist".format(self._path))
38│
39│ if not self._full_path.exists():
→ 40│ raise ValueError("File {} does not exist".format(self._path))
41│
42│ if self._full_path.is_dir():
43│ raise ValueError("{} is a directory, expected a file".format(self._path))
44│
ValueError
File \C:\Users\tteguayco\AppData\Local\pypoetry\Cache\artifacts\45\2d\cb\6443e36999e7ab3926d5385dfac9ee9ea2a62f8111ff71abb6aff70674\tzdata-2021.1-py2.py3-none-any.whl does not exist
at ~\AppData\Local\Programs\Python\Python39\lib\site-packages\poetry\core\packages\file_dependency.py:40 in __init__
36│ except FileNotFoundError:
37│ raise ValueError("Directory {} does not exist".format(self._path))
38│
39│ if not self._full_path.exists():
→ 40│ raise ValueError("File {} does not exist".format(self._path))
41│
42│ if self._full_path.is_dir():
43│ raise ValueError("{} is a directory, expected a file".format(self._path))
44│
It would be good to know what these *.whl are and how they are used by Poetry.Solutionsource: stackoverflow \u2197
Specifically I found that deleting the AppData\Local\pypoetry\Cache\artifacts folder (I'm on Windows 10) worked for me. virtualenvs for other projects may be in AppData\Local\pypoetry\Cache\virtualenvs so you might not want to delete the root cache folder at AppData\Local\pypoetry\Cache in its entirety.
API access
Get this solution programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/error/5d5c927941741486a9cfcf89daf42b22ccb53d4c923997458e75bd86c94273cfhash \u00b7 5d5c927941741486a9cfcf89daf42b22ccb53d4c923997458e75bd86c94273cf