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

PyPI package does not install #41

Open
cjw85 opened this issue Oct 14, 2022 · 14 comments
Open

PyPI package does not install #41

cjw85 opened this issue Oct 14, 2022 · 14 comments

Comments

@cjw85
Copy link
Contributor

cjw85 commented Oct 14, 2022

Under Python 3.8, Linux x86 the source package is fetched (there's only a Python 3.7 wheel) but fails to install.

Collecting pyabpoa
  Using cached pyabpoa-1.4.0.tar.gz (738 kB)
  Preparing metadata (setup.py) ... done
ERROR: No .egg-info directory found in /tmp/pip-pip-egg-info-_bey3g0a
@yangao07
Copy link
Owner

Have you tried using the downloaded gz file: https://files.pythonhosted.org/packages/1a/1f/7e3d26093c0078486a9daffc06aba01ebd8fd67058ede1d6c993d6ee77b7/pyabpoa-1.4.0.tar.gz
and then pip install pyabpoa-1.4.0.tar.gz?

@Sakshamgoel
Copy link

I was facing the same issue, and I tried downloading the .tar.gz file and installing, as you recommended. It still gives the same error, exactly as the one @cjw85 gets.

@yangao07
Copy link
Owner

yangao07 commented Nov 8, 2022

This might be due to the cached file, you can try to add --no-cache-dir in your installation command.

@Sakshamgoel
Copy link

Thanks for the help @yangao07 . However, that doesn't work either.

@yangao07
Copy link
Owner

yangao07 commented Nov 8, 2022

OK, how about specifying a version number, like: pip install pyabpoa==1.2.5?

@defendant602
Copy link

I got the same error, and I tried < pip install pyabpoa==1.2.5 >, but still got the same egg-info error.

@cjw85
Copy link
Contributor Author

cjw85 commented Nov 9, 2022

@yangao07 how did you build the source distribution, it appears simply to be invalid.

@yangao07
Copy link
Owner

yangao07 commented Nov 9, 2022

The uploaded file was built with command make publish_pypi.

@yangao07
Copy link
Owner

yangao07 commented Nov 9, 2022

I cannot reproduce this error.
The last thing I could suggest is to build pyabpoa from source:

git clone --recursive https://github.com/yangao07/abPOA.git
cd abPOA
make install_py

@cjw85
Copy link
Contributor Author

cjw85 commented Nov 10, 2022

The error can be reproduced using a minimal python docker image:

$ docker run -it python:3.8.15-bullseye bash
root@952031ba6cd8:/# pip install pyabpoa
Collecting pyabpoa
  Downloading pyabpoa-1.4.0.tar.gz (738 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 738.4/738.4 KB 31.1 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
ERROR: No .egg-info directory found in /tmp/pip-pip-egg-info-rjtnq5n0
WARNING: You are using pip version 22.0.4; however, version 22.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.

@yangao07
Copy link
Owner

Thanks @cjw85 , I can reproduce it now. Also I see this error when I use my system python:
/usr/bin/python3 -m pip install pyabpoa.

Usually I use conda python/pip and it always works well.

I will try to figure out how to fix this error when using the system python.

@yangao07
Copy link
Owner

This error might be related to the python package building process. Although I have no clue to fix it right now.

Here is my new finding:
In the docker environment, where any pyabpoa was never installed, after I installed it from the source (and uninstalled it), I could successfully install any version of pyabpoa with pip without that error.

@tgbrooks
Copy link

Per this, the error can indicate that the build step is failing but not reporting a non-zero error code. Running with pip install -v pyabpoa to enable verbose mode shows that cython is not installed, so probably this line is causing the error due to its 0 exit status.

The workaround is to first run pip install cython and then pip install pyabpoa.

FYI, to my knowledge the 'proper' way to make this work is to write a pyproject.toml file that includes lines like the following (but with the correct version numbers):

[build-system]
requires = ["setuptools ~= 58.0", "cython ~= 0.29.0"]

This informs pip what it needs to have ready for installing your project.

@cjw85
Copy link
Contributor Author

cjw85 commented Dec 19, 2023

I believe this is fixed now. The install now works for me, and I see commits where the installation files were amended to make cython a build dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants