8000 Incompatible version is released to Python 2 · Issue #8545 · chainer/chainer · GitHub
[go: up one dir, main page]

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

Incompatible version is released to Python 2 #8545

Closed
pazeshun opened this issue Feb 11, 2020 · 11 comments
Closed

Incompatible version is released to Python 2 #8545

pazeshun opened this issue Feb 11, 2020 · 11 comments
Labels
issue-checked stale Not updated for a longer period of time.

Comments

@pazeshun
Copy link
pazeshun commented Feb 11, 2020

chainer>=7.0.0 released before #8517 is still released to Python 2, even though they doesn't support Python 2.
Due to this, we cannot use pip install chainer in Python 2. Instead, we always have to specify install version like pip install chainer<7.0.0.

$ pip install --user chainer --no-cache-dir -U
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting chainer
  Downloading https://files.pythonhosted.org/packages/a8/ba/32b704e077cb24b4d85260512a5af903e772f06fb58e716301dd51758869/chainer-7.0.0.tar.gz (1.0MB)
     |████████████████████████████████| 1.0MB 8.1MB/s 
Requirement already satisfied, skipping upgrade: setuptools in /usr/lib/python2.7/dist-packages (from chainer) (20.7.0)
Requirement already satisfied, skipping upgrade: typing_extensions in /usr/local/lib/python2.7/dist-packages (from chainer) (3.6.6)
Requirement already satisfied, skipping upgrade: filelock in /usr/local/lib/python2.7/dist-packages (from chainer) (3.0.12)
Requirement already satisfied, skipping upgrade: numpy>=1.9.0 in /usr/lib/python2.7/dist-packages (from chainer) (1.11.0)
Requirement already satisfied, skipping upgrade: protobuf>=3.0.0 in /usr/local/lib/python2.7/dist-packages (from chainer) (3.7.1)
Requirement already satisfied, skipping upgrade: six>=1.9.0 in /usr/local/lib/python2.7/dist-packages (from chainer) (1.12.0)
Requirement already satisfied, skipping upgrade: typing>=3.6.2 in /usr/local/lib/python2.7/dist-packages (from typing_extensions->chainer) (3.6.6)
Building wheels for collected packages: chainer
  Building wheel for chainer (setup.py) ... done
  Created wheel for chainer: filename=chainer-7.0.0-cp27-none-any.whl size=966689 sha256=5d7d792512b88770a53c52e193fd05d6d1e3d978e4c7e8f6dcd1abc6980ea5ed
  Stored in directory: /tmp/pip-ephem-wheel-cache-MwgxDb/wheels/42/ab/c8/d723d9d7a08b5649c7343f113e74c729d4a1bd5d96e349294b
Successfully built chainer
Installing collected packages: chainer
Successfully installed chainer-7.0.0
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$ python -c 'import chainer'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/pazeshun/.local/lib/python2.7/site-packages/chainer/__init__.py", line 10, in <module>
    from chainer import backends  # NOQA
  File "/home/pazeshun/.local/lib/python2.7/site-packages/chainer/backends/__init__.py", line 1, in <module>
    from chainer.backends import cuda  # NOQA
  File "/home/pazeshun/.local/lib/python2.7/site-packages/chainer/backends/cuda.py", line 77
    def shape(self) -> types.Shape:
                    ^
SyntaxError: invalid syntax

This situation easily causes mistakes of installing incompatible versions.
In addition, this is problem when using ROS.
In ROS, we want to resolve all dependency with rosdep install command, but its philosophy is like apt and it doesn't have a method to specify install version.
http://wiki.ros.org/ROS/Tutorials/rosdep
(Now we are working on making exceptions of Python packages in that philosophy, but the discussion doesn't advance:
ros-infrastructure/rosdep#694)

I know released version cannot be overwritten,
https://stackoverflow.com/questions/21064581/how-to-overwrite-pypi-package-when-doing-upload-from-command-line
so solutions I know are the following:

I know this is difficult problem, but hope this is solved.

cf. #8517 (comment)

@knorth55
Copy link
Contributor
knorth55 commented Apr 2, 2020

What is the status of this issue?
please remove chainer 7.0.0 from pypi for python2.

@stale
Copy link
stale bot commented Jul 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Not updated for a longer period of time. label Jul 2, 2020
@knorth55
Copy link
Contributor
knorth55 commented Jul 2, 2020

this issue is not solved and causes serious error when installing chainer in python2.

@stale stale bot removed the stale Not updated for a longer period of time. label Jul 2, 2020
@stale
Copy link
stale bot commented Oct 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Not updated for a longer period of time. label Oct 4, 2020
@stale
Copy link
stale bot commented Dec 25, 2020

This issue is closed as announced. Feel free to re-open it if needed.

@knorth55
Copy link
Contributor

please please stop distributing v7.0.0 in python2 platform.
it causes a lot of problems.

@kmaehashi
Copy link
Member

I'm sorry for the inconvenience. I've uploaded v7.0.0.post1 sdist release to PyPI with the correct python_requies tag, and "yank"ed v7.0.0 release. Could you test if the problem has been resolved? (I think pip 20.3+ is required to respect yank flag)

@knorth55
Copy link
Contributor

I checked with pip 20.3.3 and it correctly install 6.7.0 for python2! Thank you so much!

[knorth55][melodic-p50][~]
$ sudo pip install chainer
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
WARNING: The directory '/home/knorth55/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting chainer
  Downloading chainer-6.7.0.tar.gz (876 kB)
     |████████████████████████████████| 876 kB 8.3 MB/s
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages (from chainer) (44.1.1)
Requirement already satisfied: typing<=3.6.6 in /usr/local/lib/python2.7/dist-packages (from chainer) (3.6.6)
Requirement already satisfied: typing_extensions<=3.6.6 in /usr/local/lib/python2.7/dist-packages (from chainer) (3.6.6)
Requirement already satisfied: filelock in ./.local/lib/python2.7/site-packages (from chainer) (3.0.12)
Requirement already satisfied: numpy>=1.9.0 in ./.local/lib/python2.7/site-packages (from chainer) (1.16.6)
Requirement already satisfied: protobuf>=3.0.0 in /usr/local/lib/python2.7/dist-packages (from chainer) (3.14.0)
Requirement already satisfied: six>=1.9.0 in ./.local/lib/python2.7/site-packages (from chainer) (1.15.0)
Building wheels for collected packages: chainer
  Building wheel for chainer (setup.py) ... done
  Created wheel for chainer: filename=chainer-6.7.0-py2-none-any.whl size=885949 sha256=7f3777ae2f0a8a8df8601251eeb9e58725b81259fce41fbdbfbc722555d83a4d
  Stored in directory: /tmp/pip-ephem-wheel-cache-OXXzyg/wheels/2a/79/8c/a36c747a259e068df041501f6101135c04edb121df2876499e
Successfully built chainer
Installing collected packages: chainer
Successfully installed chainer-6.7.0
[knorth55][melodic-p50][~]
$ pip --version
pip 20.3.3 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)

@kmaehashi
Copy link
Member

Glad to hear that!

@pazeshun
Copy link
Author

@kmaehashi Wow, very nice solution!
I would appreciate it if you apply the same solution to cupy and cupy-cuda*.
Currently, cupy/cupy-cuda* 7.0.0, 7.1.0, and 7.1.1 are released to Python 2 though they cannot be used on Python 2.
cupy/cupy#2763
cupy/cupy#2766

@kmaehashi
Copy link
Member

@pazeshun Thanks for the feedback! As for cupy-cuda* packages, I think it's reasonable to simply remove Python 2.7 wheels from PyPI, but unfortunately for cupy sdist package I would like to avoid releasing post releases for v7 series which is no longer maintained.

pazeshun added a commit to pazeshun/jsk_travis that referenced this issue May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue-checked stale Not updated for a longer period of time.
Projects
None yet
Development

No branches or pull requests

3 participants
0