Code Monkey home page Code Monkey logo

Comments (9)

NickAJScott avatar NickAJScott commented on July 23, 2024

I've had the same issues and it seems to be because python3.8.5 is inside /usr/local/bin (we were changing the PATH to include that location and as a result picking up that version rather than the image version which is in /home/circleci/.pyenv/shims/python3)

from cimg-python.

amitg-dt avatar amitg-dt commented on July 23, 2024

I'm also getting another version when when using cimg/python (tried with 3.7 and 3.7.12 tag):

#!/bin/bash -eo pipefail
pipenv install

Creating a virtualenv for this project...
Pipfile: /home/circleci/project/Pipfile
Using /usr/bin/python3 (3.8.10) to create virtualenv...
created virtual environment CPython3.8.10.final.0-64 in 339ms
creator CPython3Posix(dest=/home/circleci/.local/share/virtualenvs/project-zxI9dQ-Q, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/circleci/.local/share/virtualenv)
added seed packages: pip==21.2.4, setuptools==58.0.4, wheel==0.37.0
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator

from cimg-python.

felicianotech avatar felicianotech commented on July 23, 2024

This all seems to be around PATH. If you manipulate PATH, things can happen.

For the pipenv example, I see if there's something we can do to let it know it's in a pyenv environment.

from cimg-python.

PeterJCLaw avatar PeterJCLaw commented on July 23, 2024

Please note that the original reproduce does not involve modifications to PATH.

from cimg-python.

amitg-dt avatar amitg-dt commented on July 23, 2024

This all seems to be around PATH. If you manipulate PATH, things can happen.

For the pipenv example, I see if there's something we can do to let it know it's in a pyenv environment.

I'm also didn't manipute the PATH, the only step before is 'pip install pipenv'
Please watch the file system after extracting cimg/python:3.7 - you can see that the python version is 3.8
https://drive.google.com/file/d/1xB2XCDiMovLvhnYwPyM_vBKkDMiJQ0HX/view?usp=sharing

The image digest is f90d693d4a06

from cimg-python.

NickAJScott avatar NickAJScott commented on July 23, 2024

Yup my original comment was due to the changing of the path, in the original one it sounds like it's due to the script finding the latest version available (which is the one inside the usr/local/bin folder) whereas the intended one for each version is in the path in the pyenv shims folder. I'm not sure you can expect there to never be a newer version of python somewhere in the image (as they also come with other programs installed e.g. visual studio, which also contains a 3.8 version of python)

from cimg-python.

amitg-dt avatar amitg-dt commented on July 23, 2024

I've "Bypassed" the issue by adding python version flag to pipenv....
pipenv --python 3.7 install

from cimg-python.

felicianotech avatar felicianotech commented on July 23, 2024

Closing this issue due to lack of activity. I checked the image for Python v3.10.5 and didn't see an additional system Python in that image. Please feel free to open an new issue (and link back to this one) if there is new information.

from cimg-python.

PeterJCLaw avatar PeterJCLaw commented on July 23, 2024

Closing this issue due to lack of activity.

@felicianotech apologies, was there more information that was requested here? From what I can tell the lack of activity is because the community are waiting on a response from the maintainers, though perhaps I am missing something?

For clarity, here's some minimal reproduces (having done fresh docker pulls of the named images):

$ docker run -it --rm cimg/python:3.7 which python3.{6,7,8,9,10}
/home/circleci/.pyenv/shims/python3.7
/usr/bin/python3.8

$ docker run -it --rm cimg/python:3.8 which python3.{6,7,8,9,10}
/home/circleci/.pyenv/shims/python3.8

$ docker run -it --rm cimg/python:3.9 which python3.{6,7,8,9,10}
/usr/bin/python3.8
/home/circleci/.pyenv/shims/python3.9

$ docker run -it --rm cimg/python:3.10 which python3.{6,7,8,9,10}
/usr/bin/python3.8
/home/circleci/.pyenv/shims/python3.10

I would not have expected that Python 3.8 was present at all in images other than cimg/python:3.8 (or at least not on PATH). Could you clarify whether this is expected?

If it is expected, I would encourage documenting that that is the case.

from cimg-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.