-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pip install on latest ubuntu fails with error #398
Comments
Hello @rotemseekingalpha. Thank you for your report. I've tried to reproduce the issue, but I can't reproduce the same error message. For me it looks like the issue with invalid file context. Could you please provide a link to the public repository to reproduce the issue ? |
I see the same thing as of today (did not happen yesterday). My repository is private, but here is a sample of the Github workflow.
|
This looks related to this: pypa/pipenv#5091 The latest version of |
Sorry for this regression -- there is work to convert everyone to the |
A quick fix is sticking to the immediately previous version
Update: You should consider using A good way of doing so can be |
The reason I do it is because pypa/pipenv#356. The dependency installation needs to happen as a part of building a Docker image on the CI pipeline, and it times out when using pipenv to do it. Here's a blog post I wrote quite a while back regarding it - https://medium.com/analytics-vidhya/docker-containers-for-pipenv-3be128f1444. I haven't dug deep inside how cross-compatible this process is (as you mentioned requirements.txt does not include hashes to validate against), but it has worked fine for me for the last 2-3 years. |
The issue you linked to is from 2019, I think a lot has changed since then. Furthermore you are doing a
It is less about compatibility and more about security. If you are generating your lock file on every CI run and installing requirements from that without hash checking, then you aren't verifying that the packages you install in the CI today match the exact versions that you installed yesterday. The version numbers will match, but the package contents could have changed either because it resolved to a different pypi server (DNS poisoning or otherwise), package confusion attack against a private package in the public pypi, or general bad actor published a different version of a package that was not pinned and that gets pulled in automatically. There are many ways this could happen and that is what the hash checking helps prevent against, but it doesn't provide protection if the CI regenerates the hashes every build, or discards them during the install phase. |
This will solve this problem for now actions/setup-python#398
This will solve this problem for now actions/setup-python#398
This will solve this problem for now actions/setup-python#398 fix: install dependencies to the system directly from pipenv This will solve this problem for now actions/setup-python#398
@jaredthecoder, @singhpratyush, @matteius Thanks :) |
Thanks for taking the time and explaining @matteius, and debunking some of my misconceptions. I modified the CI pipeline to completely use I will update the article with the latest information. Cheers! |
* Get ECR repository from Terraform-Modules * Remove unused function from DataFlowsCodePipeline * Workaround Fn bug in cdktf 0.9.0 See hashicorp/terraform-cdk#1765 * Add workaround for bug in pipenv 2022.3.24 actions/setup-python#398
Hello everyone. Thank you for your help. Yesterday the new version of |
@dmitry-shibanov It's working as expected on Here's what now works that was failing before RUN apt-get update && \
apt-get -y install python3-dev ... && \
pip3 install pipenv ... && \
pipenv lock -r > requirements.txt && \
pipenv lock --dev -r > dev-requirements.txt && \
pip3 install -r requirements.txt && \
... |
Hello everyone. For now I'm going to close the issue because it works as expected for 2022.5.2. If you have any concerns feel free to ping us. |
I'm getting an error when using the following in my workflows yaml:
Is this still an issue for anyone else? |
@ianyoung There was a deprecation warning around |
Ah, I've not used it for a while. That explains things. Thanks for the quick reply @matteius. For anyone else who needs it here's the updated instruction in the docs. |
Description:
github actions for python 3.8 fails with the following error:
Action version:
Platform:
Runner type:
Tools version:
Repro steps:
Create a repo with Pipfile, add dependencies and lock the Pipfile.
run:
Expected behavior:
pip should install all required packages
Actual behavior:
pip fails with thee following error:
The text was updated successfully, but these errors were encountered: