Code Monkey home page Code Monkey logo

Comments (12)

adrogon avatar adrogon commented on June 25, 2024 6

Is the following related?

Before

- image: circleci/python:3.10
- sudo pip install awscli

✔️ Passes.

After

- image: cimg/python:3.10
- sudo pip install awscli

sudo: pip: command not found

from cimg-python.

felicianotech avatar felicianotech commented on June 25, 2024 3

Is everyone here trying to use pip with sudo? Using it without sudo works: https://app.circleci.com/pipelines/github/felicianotech/cci-testing-pub/795/workflows/b06c6237-8392-4375-beaf-294b576a4541/jobs/1805

from cimg-python.

adrogon avatar adrogon commented on June 25, 2024 1

@felicianotech It does work, thank you for that 😊

from cimg-python.

kelvintaywl avatar kelvintaywl commented on June 25, 2024

From recent GitHub issues in Pyenv, it seems there has been a recent change to how much is needed to be done to ensure Pyenv is initialized as part of $PATH.

Example Issue: pyenv/pyenv#1906

This looks to be a recent issue (perhaps starting from a particular Pyenv version).

from cimg-python.

hyperknot avatar hyperknot commented on June 25, 2024

I'm running into this as well. What I found out is that I locally have a .python-version file and it breaks the build environment on CircleCI. This is a recent change and it was quite difficult to debug.
Fix is to add

      - run: rm .python-version

at the top of the config.

from cimg-python.

felicianotech avatar felicianotech commented on June 25, 2024

There were some changes to the Python image a few months ago. Is anyone having this issue with images published within the past couple of months?

from cimg-python.

mellis-at-infomedia avatar mellis-at-infomedia commented on June 25, 2024

I've this exact problem 3.10. Should try a different version?

from cimg-python.

felicianotech avatar felicianotech commented on June 25, 2024

@mellis-at-infomedia When v3.10.6 came out, the alias 3.10 was updated. Which specific tag are you using? Is there a build link with the error that is for a public project?

from cimg-python.

adrogon avatar adrogon commented on June 25, 2024

Same problem so far, still trying 3.10. No link to provide, sorry. But here is a sample workflow to reproduce the issue:

version: 2.1

jobs:
  old_image:
    docker:
      - image: circleci/python:3.10
    steps:
      - run: sudo pip install awscli
  new_image:
    docker:
      - image: cimg/python:3.10
    steps:
      - run: sudo pip install awscli

workflows:
  build_and_test:
    jobs:
      - old_image
      - new_image

Screenshot from 2022-09-15 20-14-34

Screenshot from 2022-09-15 20-15-30

from cimg-python.

mellis-at-infomedia avatar mellis-at-infomedia commented on June 25, 2024

You may need to fall back to circleci/python:3.10, which is not the version CircleCI recommends and is marked as experimental, but does seem to have less of these issues

from cimg-python.

felicianotech avatar felicianotech commented on June 25, 2024

I'm going to go ahead and close this. In the near future, we'll be updating this readme (as well as for the other images) and how to use package managers, such as when to use sudo or not. Hopefully that will make it clear since I know sometimes it's confusing.

from cimg-python.

anilanar avatar anilanar commented on June 25, 2024

I think there are legitimate cases when pip or binaries installed by pip need to be used with sudo, for example when running things that will do system-wide operations with sudo.

So I think this issue should be reopened and pip should be pre-installed for root user as well as for the non-root circleci user.

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.