Description
-
I am on the latest Poetry version.
-
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:
-
Poetry version: 1.1.7
Issue
We use Poetry on Heroku to install our packages. For this, we list poetry==1.1.7
as sole dependency in our requirements.txt
, and have a post-compile hook that looks like this:
python -m poetry config virtualenvs.create false
python -m poetry install --no-dev 2>&1
Additionally, we invalidate the cache in the pre-compile hook to ensure we always start with a clean environment and don't have any old packages lying around:
echo "taint cache" > "$CACHE_DIR/.heroku/requirements.txt"
All in all this seems to work fine, however, we spuriously encounter errors like these:
-----> Running post-compile hook
-----> Installing dependencies with Poetry...
Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file
Package operations: 91 installs, 7 updates, 4 removals
• Removing packaging (20.9)
• Removing pexpect (4.8.0)
• Removing ptyprocess (0.7.0)
• Removing pyparsing (2.4.7)
• Updating six (1.16.0 -> 1.15.0)
• Updating cffi (1.14.6 -> 1.14.5)
• Installing jmespath (0.10.0)
• Installing python-dateutil (2.8.1)
• Updating urllib3 (1.26.6 -> 1.26.5)
• Installing botocore (1.20.34)
• Updating certifi (2021.5.30 -> 2020.12.5)
• Installing chardet (3.0.4)
• Updating cryptography (3.4.7 -> 3.4.6)
• Installing defusedxml (0.7.1)
• Installing et-xmlfile (1.0.1)
• Updating idna (3.2 -> 2.10)
• Installing multidict (5.1.0)
EnvCommandError
Command ['/app/.heroku/python/bin/python', '-m', 'pip', 'install', '--no-deps', '/app/.cache/pypoetry/artifacts/36/92/90/7beba42c3a6efbfdc30dc864c33286fa23817b3942b21ccaf319f18ed3/multidict-5.1.0-cp38-cp38-manylinux2014_x86_64.whl'] errored with the following return code 1, and output:
Processing /app/.cache/pypoetry/artifacts/36/92/90/7beba42c3a6efbfdc30dc864c33286fa23817b3942b21ccaf319f18ed3/multidict-5.1.0-cp38-cp38-manylinux2014_x86_64.whl
Installing collected packages: multidict
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/tmp/build_8c19dde7/.heroku/python/lib/python3.8/site-packages/~dna-3.2.dist-info'
WARNING: You are using pip version 20.2.4; however, version 21.1.3 is available.
You should consider upgrading via the '/app/.heroku/python/bin/python -m pip install --upgrade pip' command.
This error is not specific to a single package, we saw it happen for different packages.
The error always is the No such file or directory
for the .dist-info
.
The file/directory that is not found always has the first character substituted by ~
which might be a name constructed by pip's AdjacentTempDirectory
.
As the error is only occurring spuriously and as I have no interactive access to the build environment, I am not really sure how I should best debug this further.
Activity