esa / pygmo2

A Python platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
https://esa.github.io/pygmo2/
Mozilla Public License 2.0
414 stars 56 forks source link

[BUG] cannot find the latest release version via pip #137

Closed liuyangzhuan closed 8 months ago

liuyangzhuan commented 1 year ago

Hi, I'm trying to install pygmo with pip on my ubuntu system, I see from https://pypi.org/project/pygmo/#history there are 2.19.5 and 2.19.4 but pip install pygmo==2.19.5

shows ERROR: Could not find a version that satisfies the requirement pygmo==2.19.5 (from versions: 2.14.1, 2.15.0, 2.16.0, 2.16.1, 2.19.0) ERROR: No matching distribution found for pygmo==2.19.5

It seems that only up to 2.19.0 can be found by pip. I'm using pip 23.1.2 from Python 3.8.4 (I also tried Python 3.9 and 3.10, but it didn't work either)

However, even with pip install pygmo==2.19.0, I got ERROR: pygmo==2.19.0 from https://files.pythonhosted.org/packages/e2/12/090ba61479f60d5177a0048736d09dc028b2d65063ed44cb952df506336f/pygmo-v2.19.0.tar.gz does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

Any suggestion?

bluescarni commented 1 year ago

@liuyangzhuan not sure what is going on here. I am a bit puzzled by the fact that pip is looking for pygmo-v2.19.0.tar.gz, which is a source tarball, rather than the precompiled wheel, which would be called pygmo-2.19.0-cp38-cp38-manylinux_2_28_x86_64.whl.

What operating system version and architecture are you working on?

liuyangzhuan commented 1 year ago

My system is Distributor ID: Ubuntu Description: Ubuntu 18.04.5 LTS Release: 18.04 Codename: bionic

liuyangzhuan commented 1 year ago

Any follow-up on this issue @bluescarni ?

liuyangzhuan commented 10 months ago

@bluescarni Any follow-up on this? I want to add that this problem also happens on my mac laptop in addition to my ubuntu system.

MKermanipoor commented 8 months ago

@liuyangzhuan

Hi, I had the same problem as well, but I just install the previous available version of this library which is 2.13.0.

pip install pygmo==2.13.0

liuyangzhuan commented 8 months ago

@MKermanipoor I'm aware that 2.13.0 is working correctly. I'd like to have pip support for 2.19.0 and later. @bluescarni This ticket has been opened for 5 months and as you can see, proper pip support is a desired feature for many users. I really hope someone on the pygmo team can fix this...

bluescarni commented 8 months ago

@liuyangzhuan @MKermanipoor

I cannot reproduce your issue locally, and please note that the pygmo 2.19.x wheels are being downloaded hundreds of times per day from PyPI:

https://www.pepy.tech/projects/pygmo https://pypistats.org/packages/pygmo

So it seems like there might be some environment setup issue on your side.

On my local machine, using a virtual environment:

$ python -m venv ./pygmo_venv
$ . ./pygmo_venv/bin/activate
$ pip install pygmo
Collecting pygmo
  Downloading pygmo-2.19.5-cp311-cp311-manylinux_2_28_x86_64.whl (14.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.7/14.7 MB 6.1 MB/s eta 0:00:00
Collecting numpy (from pygmo)
  Obtaining dependency information for numpy from https://files.pythonhosted.org/packages/8a/08/a7e5dadc21fe193baea5f257e11b7b70cc27a89692fc9e3ed690e55cc4b6/numpy-1.26.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Using cached numpy-1.26.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
Collecting cloudpickle (from pygmo)
  Obtaining dependency information for cloudpickle from https://files.pythonhosted.org/packages/96/43/dae06432d0c4b1dc9e9149ad37b4ca8384cf6eb7700cd9215b177b914f0a/cloudpickle-3.0.0-py3-none-any.whl.metadata
  Downloading cloudpickle-3.0.0-py3-none-any.whl.metadata (7.0 kB)
Collecting scipy (from pygmo)
  Obtaining dependency information for scipy from https://files.pythonhosted.org/packages/ef/1b/7538792254aec6850657d5b940fd05fe60582af829ffe40d6c054f065f34/scipy-1.11.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Downloading scipy-1.11.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.4/60.4 kB 15.1 MB/s eta 0:00:00
Downloading cloudpickle-3.0.0-py3-none-any.whl (20 kB)
Using cached numpy-1.26.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
Downloading scipy-1.11.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (36.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 36.4/36.4 MB 26.0 MB/s eta 0:00:00
Installing collected packages: numpy, cloudpickle, scipy, pygmo
Successfully installed cloudpickle-3.0.0 numpy-1.26.1 pygmo-2.19.5 scipy-1.11.3
$ python
Python 3.11.5 (main, Sep 22 2023, 18:48:52) [GCC 13.1.1 20230520] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygmo
>>>
bluescarni commented 8 months ago

@liuyangzhuan @MKermanipoor

Perhaps you are using Linux distributions which are too old? I was taking a look at the manylinux compatibility matrix here:

https://github.com/pypa/manylinux

We are using the manylinux_2_28 tag, which implies that your OS must have glibc version at least 2.28, but it seems like Ubuntu 18.04 has glibc version 2.27:

https://launchpad.net/ubuntu/bionic/+source/glibc

That might be the reason why pip is refusing to use the precompiled wheel.

MKermanipoor commented 8 months ago

@bluescarni

I have tested the installation comment on the different device as well, and I got same result. Both devices have Windows 10 as OS.

bluescarni commented 8 months ago

@bluescarni

I have tested the installation comment on the different device as well, and I got same result. Both devices have Windows 10 as OS.

@MKermanipoor

We do not provide pip wheels for Windows, only for Linux x86-64.

conda has pygmo packages for Windows.

liuyangzhuan commented 8 months ago

@bluescarni This makes sense. I've tried pip install pygmo==2.19.0 on newer linux systems and it works. It seems that the solution would be enforcing pygmo==2.13.0 in requirement.txt when we use linux systems with glibc version <=2.27

bluescarni commented 8 months ago

@liuyangzhuan @MKermanipoor I would recommend you to look into using conda instead, pip is not a suitable package manager for multi-language projects such as pygmo.

Closing the report.