setup-python icon indicating copy to clipboard operation
setup-python copied to clipboard

ERROR: No .egg-info directory found in /tmp/pip-pip-egg-info

Open oegedijk opened this issue 5 years ago • 28 comments

Describe the bug

When I try to install the shap python package with actions/setup-python, I get the following error:

ERROR: No .egg-info directory found in /tmp/pip-pip-egg-info-2o6_dq3n

Shap installs fine on my local machine, and other packages also work fine on github actions. This behaviour started about two days ago. As a result I cannot run the test suite for my explainerdashboard package.

Which version of the action are you using?

  • [ ] v1
  • [ x] v2
  • [ ] Some other tag (such as v2.0.1 or master)

Environment

  • [ ] self-hosted
  • [x ] Linux
  • [x ] Windows
  • [ x] Mac

If applicable, please specify if you're using a container

Python Versions Please list all of the effected versions of Python (3.6, 3.7, 3.8)

To Reproduce Steps to reproduce the behavior: Run the following github actions scripts:

name: test_action

on:
  push:
    branches: [ master ]
    
jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        python-version: [3.6, 3.7, 3.8]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip wheel
        pip install flake8 pytest
        pip install shap

Then you get the following output:

Run python -m pip install --upgrade pip wheel
Collecting pip
  Downloading pip-20.3.1-py2.py3-none-any.whl (1.5 MB)
Collecting wheel
  Downloading wheel-0.36.1-py2.py3-none-any.whl (34 kB)
Installing collected packages: pip, wheel
  Attempting uninstall: pip
    Found existing installation: pip 20.2.4
    Uninstalling pip-20.2.4:
      Successfully uninstalled pip-20.2.4
Successfully installed pip-20.3.1 wheel-0.36.1
Collecting flake8
  Downloading flake8-3.8.4-py2.py3-none-any.whl (72 kB)
Collecting pytest
  Downloading pytest-6.1.2-py3-none-any.whl (272 kB)
Collecting attrs>=17.4.0
  Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting importlib-metadata
  Downloading importlib_metadata-3.1.1-py3-none-any.whl (9.6 kB)
Collecting iniconfig
  Downloading iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting mccabe<0.7.0,>=0.6.0
  Downloading mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
Collecting packaging
  Downloading packaging-20.7-py2.py3-none-any.whl (35 kB)
Collecting pluggy<1.0,>=0.12
  Downloading pluggy-0.13.1-py2.py3-none-any.whl (18 kB)
Collecting py>=1.8.2
  Downloading py-1.9.0-py2.py3-none-any.whl (99 kB)
Collecting pycodestyle<2.7.0,>=2.6.0a1
  Downloading pycodestyle-2.6.0-py2.py3-none-any.whl (41 kB)
Collecting pyflakes<2.3.0,>=2.2.0
  Downloading pyflakes-2.2.0-py2.py3-none-any.whl (66 kB)
Collecting pyparsing>=2.0.2
  Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting toml
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting zipp>=0.5
  Downloading zipp-3.4.0-py3-none-any.whl (5.2 kB)
Installing collected packages: zipp, pyparsing, importlib-metadata, toml, pyflakes, pycodestyle, py, pluggy, packaging, mccabe, iniconfig, attrs, pytest, flake8
Successfully installed attrs-20.3.0 flake8-3.8.4 importlib-metadata-3.1.1 iniconfig-1.1.1 mccabe-0.6.1 packaging-20.7 pluggy-0.13.1 py-1.9.0 pycodestyle-2.6.0 pyflakes-2.2.0 pyparsing-2.4.7 pytest-6.1.2 toml-0.10.2 zipp-3.4.0
Collecting shap
  Downloading shap-0.37.0.tar.gz (326 kB)
ERROR: No .egg-info directory found in /tmp/pip-pip-egg-info-2o6_dq3n
Error: Process completed with exit code 1.

Run/Repo Url If applicable, and if your repo/run is public, please include a URL so it is easier for us to investigate.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

oegedijk avatar Dec 07 '20 09:12 oegedijk

Same problem in GitHub Hosted runner(No error in Self-hosted runner). The version of pip and shap is not the cause. I also tried to add --use-deprecated=legacy-resolver in pip install command, but it didn't work.

ddangu525 avatar Dec 08 '20 05:12 ddangu525

I found the reason. Upgrade setuptools.

ddangu525 avatar Dec 14 '20 05:12 ddangu525

Upgrading from Python 3.6.6 to 3.7 worked for me.

andrewdoss avatar Jan 04 '21 22:01 andrewdoss

I found the reason. Upgrade setuptools.

Can confirm this worked for me as well.

jprafael avatar Jan 08 '21 11:01 jprafael

Having the same issue, however upgrading setuptools (v53.0.0) does not solve it. Any idea what could be causing it?

kjanko avatar Feb 10 '21 08:02 kjanko

Having the same issue, however upgrading setuptools (v53.0.0) does not solve it. Any idea what could be causing it?

Same here. Upgrading to setuptools v53.0.0 made no difference. I'm on Python 3.6.7.

Update

I resolved this by making sure I installed numpy prior to installing shap. See https://github.com/slundberg/shap/issues/1633.

gregross avatar Feb 12 '21 19:02 gregross

Thanks, installing numpy first worked for me.

oshev avatar Apr 08 '21 16:04 oshev

I am facing the same issue while installing shap==0.39.0. I updated my packages to following versions:

setuptools ==56.0.0 pip==21.0.1 python==3.7.3

By updating packages also it doesn't seem to resolve.

tonysinghmss avatar Apr 21 '21 11:04 tonysinghmss

It showed me the same error when I use virtualenv.

Solution:

Install the requirement packages before use setuptools. pip install -r requirements.txt or one by one.

This works for me.

truethari avatar Apr 22 '21 02:04 truethari

Thanks, installing numpy first worked for me too.

harrylyx avatar Jul 08 '21 08:07 harrylyx

you have to pip install numpy first and to pip install shap.... as they said...

Hysmane avatar Sep 27 '21 23:09 Hysmane

Clara, Thank you very much!!!!!

Hysmane avatar Sep 27 '21 23:09 Hysmane

Hello @oegedijk! We apologize for such a late reply. Is this issue still relevant to you?

nikita-bykov avatar Nov 19 '21 13:11 nikita-bykov

Hello @oegedijk, I tried to reproduce it and everything works for me as expected. I'm going to close the issue, but if it is still relevant to you, feel free to contact us.

nikita-bykov avatar Dec 17 '21 10:12 nikita-bykov

Hello @oegedijk, I tried to reproduce it and everything works for me as expected. I'm going to close the issue, but if it is still relevant to you, feel free to contact us.

Hi Nikita,

This issue still seems to exist for me. I raised a new one as well.

https://github.com/ibmdb/python-ibmdb/issues/723

Lenyas66 avatar Feb 08 '22 21:02 Lenyas66

1-unzip downloaded file. 2-open command line as administrator. 3-change directory to unzipped folder. 4-run: python setup.py install

asadikani avatar Aug 28 '22 11:08 asadikani

Upgrading from Python 3.6.6 to 3.7 worked for me. Yes, I was also having same error, resolved by changing the python version and environment. I guess its the error due to old python's files gone missing.

nikhilrane-21 avatar Oct 31 '22 04:10 nikhilrane-21

I meet this problem too. I uninstall the setuptools and the error gone.

qingfusheng avatar Nov 03 '22 14:11 qingfusheng

I meet this problem too when I install fire. I used python==3.10, but fire is only support python3.6-3.9 so I use conda to build a environment with python3.9 this error gone

guweixin avatar Feb 23 '23 03:02 guweixin

I meet this problem too. I uninstall the setuptools and the error gone.

this works for me!

caiya55 avatar Apr 21 '23 01:04 caiya55