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

Bug Report: <BUG> cimg/python:3.12.6 breaks our builds #248

Open
BenSandeen opened this issue Sep 11, 2024 · 0 comments
Open

Bug Report: <BUG> cimg/python:3.12.6 breaks our builds #248

BenSandeen opened this issue Sep 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@BenSandeen
Copy link

Describe the bug
cimg/python:3.12.6 broke our CircleCI builds, specifically breaking pip package installation

To Reproduce
The failing build step is defined as follows:

      - run:
          name: install python dependencies
          command: |
            python -m pip install --upgrade pip
            python -m pip install pipenv --user
            pipenv install

This is our Pipfile:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
ansible = "*"
ansible-lint = "*"
boto3 = "*"
credstash = "*"
cryptography = "*"
six = "*"
yamllint = "*"
wheel = "*"
awscli = "*"

[dev-packages]

[requires]
python_version = "3.12"

With cimg/python:3.12.6, we get the following output for the Python package installation step:

Requirement already satisfied: pip in /home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages (24.2)
Requirement already satisfied: pipenv in /home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages (2024.0.1)
Requirement already satisfied: certifi in /home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages (from pipenv) (2024.8.30)
Requirement already satisfied: setuptools>=67 in /home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages (from pipenv) (74.1.2)
Requirement already satisfied: virtualenv>=20.24.2 in /home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages (from pipenv) (20.26.4)
Requirement already satisfied: distlib<1,>=0.3.7 in /home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages (from virtualenv>=20.24.2->pipenv) (0.3.8)
Requirement already satisfied: filelock<4,>=3.12.2 in /home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages (from virtualenv>=20.24.2->pipenv) (3.16.0)
Requirement already satisfied: platformdirs<5,>=3.9.1 in /home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages (from virtualenv>=20.24.2->pipenv) (4.3.1)
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Installing dependencies from Pipfile.lock (380628)...
Traceback (most recent call last):
  File "/home/circleci/.pyenv/versions/3.12.6/bin/pipenv", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/cli/options.py", line 58, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/vendor/click/decorators.py", line 92, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/cli/command.py", line 209, in install
    do_install(
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/routines/install.py", line 234, in do_install
    raise e
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/routines/install.py", line 220, in do_install
    do_install_dependencies(
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/routines/install.py", line 413, in do_install_dependencies
    batch_install(
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/routines/install.py", line 481, in batch_install
    if not project.environment.is_satisfied(dep)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/project.py", line 514, in environment
    self._environment = self.get_environment(allow_global=allow_global)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/project.py", line 500, in get_environment
    environment = Environment(
                  ^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/environment.py", line 79, in __init__
    self._base_paths = self.get_paths()
                       ^^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/environment.py", line 334, in get_paths
    c = subprocess_run(command)
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/site-packages/pipenv/utils/processes.py", line 72, in subprocess_run
    return subprocess.run(
           ^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/circleci/.pyenv/versions/3.12.6/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/circleci/repo/.venv/bin/python'

Exited with code exit status 1

Expected behavior
Install Python packages successfully

Workarounds
Specifying 3.12.5 avoids this issue

@BenSandeen BenSandeen added the bug Something isn't working label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant