Skip to content
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

No such file or directory: '.../venv/bin/python3' #130

Closed
karmingc opened this issue Apr 5, 2022 · 4 comments
Closed

No such file or directory: '.../venv/bin/python3' #130

karmingc opened this issue Apr 5, 2022 · 4 comments

Comments

@karmingc
Copy link

karmingc commented Apr 5, 2022

I was previously using circleci/python:3.8.10 and found no issues with my build, both on PRs and on main branch builds.

      - restore_cache:  # ensure this step occurs *before* installing dependencies
          key: deps9-{{ .Branch }}-{{ checksum "requirements.txt" }}
      - run:
          name: install requirements
          command: |
            python3 -m venv venv
            source venv/bin/activate
            pip install -r requirements.txt
      - save_cache:
          key: deps9-{{ .Branch }}-{{ checksum "requirements.txt" }}
          paths:
            - "venv"

As part of migrating from python 3.8 to python 3.10x on my web application, I updated to cimg/python:3.10.4 and there were no issues with PRs - the circleci went through successfully. However, once merged to main branch, it started failing with

#!/bin/bash -eo pipefail
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Error: [Errno 2] No such file or directory: '/home/circleci/<project name>/venv/bin/python3'

Exited with code exit status 1
CircleCI received exit code 1

I'm suspecting some issues with caches, but i'm unsure how to resolve.

When i tried to SSH into the PR, i can see python3 in blue cyan, which i'm assuming is a symlink.

Screen Shot 2022-04-05 at 5 07 57 PM

However, once merged, python3 is in red...

Screen Shot 2022-04-05 at 5 08 10 PM

Any ideas?

@karmingc
Copy link
Author

karmingc commented Apr 5, 2022

@FelicianoTech do you mind taking a look?

@karmingc
Copy link
Author

oddly, it does seem to be re-appearing anymore... closing this issue.

@merwok
Copy link

merwok commented Jun 7, 2023

We’ve had this issue regularly and I diagnosed it today as this one.

We depend on cimg/python:3.10, tox ends up creating a patch-version-specific symlink like ~/.pyenv/versions/3.10.11/bin/python, we cache the virtualenv, then on a release day the cache is restored and the symlink broken.

For an X.Y version, I would not mind if the symlink was to X.Y python, meaning patch updates happen without notice.
Or if you tell me that I should use X.Y.Z today with dependabot to get updates, that would work for me too!

@shaunagm
Copy link

shaunagm commented Jun 16, 2023

We've been having this issue for ages too (at least, I think it's this issue). Is there an easier way to fix this problem then doing a separate commit to update the cache keys every time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants