rochacbruno / python-project-template

DO NOT FORK, CLICK ON "Use this template" - A github template to start a Python Project - this uses github actions to generate your project based on the template.
https://github.com/rochacbruno/python-project-template/generate
The Unlicense
1.06k stars 157 forks source link

CI Workflow run error #26

Open stefanomorni opened 1 year ago

stefanomorni commented 1 year ago

Hi, Foremost, thanks for sharing these templates. I'm a beginner to Python and hope this will help me build my first project, despite not being able to understand half of the content of the readme.md.

While creating my project clone, I received a “CI Workflow run” error message. Looking into it on GitHub, the detail of the error was:

… 2022-08-06T15:58:16.0724267Z ##[group]Run actions/setup-python@v2 2022-08-06T15:58:16.0724613Z with: 2022-08-06T15:58:16.0724799Z python-version: 3.9 2022-08-06T15:58:16.0725262Z token: * 2022-08-06T15:58:16.0725445Z ##[endgroup] 2022-08-06T15:58:16.7770614Z Successfully setup CPython (3.9.13) 2022-08-06T15:58:16.8091702Z ##[group]Run pip install --user --upgrade pip 2022-08-06T15:58:16.8092164Z �[36;1mpip install --user --upgrade pip�[0m 2022-08-06T15:58:16.8276808Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'" 2022-08-06T15:58:16.8277109Z env: 2022-08-06T15:58:16.8277410Z pythonLocation: C:\hostedtoolcache\windows\Python\3.9.13\x64 2022-08-06T15:58:16.8277674Z ##[endgroup] 2022-08-06T15:58:35.0156418Z Requirement already satisfied: pip in c:\hostedtoolcache\windows\python\3.9.13\x64\lib\site-packages (22.2.1) 2022-08-06T15:58:35.5641334Z Collecting pip 2022-08-06T15:58:35.5958308Z Downloading pip-22.2.2-py3-none-any.whl (2.0 MB) 2022-08-06T15:58:35.6762744Z ---------------------------------------- 2.0/2.0 MB 25.8 MB/s eta 0:00:00 2022-08-06T15:58:35.6929232Z ERROR: To modify pip, please run the following command: 2022-08-06T15:58:35.6930066Z C:\hostedtoolcache\windows\Python\3.9.13\x64\python.exe -m pip install --user --upgrade pip** … (see enclosed print screen as well)

I'm using Anaconda Python, so I usually install packages through "Conda install" not pip (if possible). I tried to run the command suggested in the error message "C:\hostedtoolcache\windows\Python\3.9.13\x64\python.exe -m pip install --user --upgrade pip" but the directory mentioned hostedtoolcache was no more available.

So, please help:

Am I doing something wrong?
What are the "consequences" of this error?
How can I solve the issue?
error

error

Many thanks for your help.

Stefano

joseph-brody commented 1 year ago

I have the same issue

sdementen commented 1 week ago

I had the same issue and got it fixed by changing in the .github/workflows/main.yaml the "pip" command to "python -m pip"

      - name: Install Pip
        run: python -m pip install --user --upgrade pip
      - name: Install project
        run: python -m pip install -e .[test]