Bug 1664722
Summary: | Latest release breaks easy_install | ||
---|---|---|---|
Product: | [Fedora] Fedora EPEL | Reporter: | Patrick Gerken <patrick.gerken> |
Component: | python3-setuptools | Assignee: | Miro Hrončok <mhroncok> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | epel7 | CC: | cstratak, mhroncok, orion, pviktori, python-sig, TicoTimo |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | python3-setuptools-39.2.0-2.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-01-27 00:41:54 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1576924 | ||
Bug Blocks: |
Description
Patrick Gerken
2019-01-09 13:59:32 UTC
I wonder if this is actually a problem in setuptools or if the Fedora change about /usr/local/lib got smuggled into EPEL7 without anybody noticing. Anyway probably too late to change that, so here's the setuptools fix: https://src.fedoraproject.org/rpms/python-setuptools/blob/master/f/create-site-packages.patch But this would just create the empty site-packages directory when calling easy install, while there already is an existing site-package in /usr/lib/python36 already Oh, interesting, it looks like that is also they it was handled with the older setuptools. See https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe for why this was done in Fedora. Not sure if this is supposed to be in EPEL, but I guess even if it shouldn't, it's too late now. (In reply to Miro Hrončok from comment #5) > See https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe for why this > was done in Fedora. Not sure if this is supposed to be in EPEL, but I guess > even if it shouldn't, it's too late now. It could be backported but this change was only intended for Fedora. An existing container with the previous setuptools version has a directory /usr/lib/python3.6/site-packages which only contains a directory named __pycache__ the older version easy_install installed everything to /usr/local/lib/python3.6/site-packages. With Miros patch, the current version of python36-setuptools would do the same and easy_install should work again. If I apply this patch manually, I can install packages with easy_install. But I noticed that now easy_install.py is in /usr/lib/python3.6, whereas everything installed with easy_install ends up in /usr/local/lib/python3.6. This behavior is different to the previous version :-( > This behavior is different to the previous version
Nothing changed in setuptools about this, it's a change in the python36 package. Not sure when it got in.
BTW You should not be sudo easy_installing things. That's very dangerous. Get a Python virtual environment, or at least use pip install --user.
I compared the python36 versions of all installed packages from a docker image about two weeks ago before the update of python36-setuptools to a current docker image where I install all packages freshly. I have python36, python36-libs and python36-setuptools. Of all three only python36-setuptools is in a newer version. Unfortunately I don't know anything about packaging and don't understand the syntax of the .spec file enough to understand what is going on. Regarding not sudo easy_installing things: I only use easy_install once while building the docker image because I want to provide pipenv. I want to use pip to install pipenv, but there is no pip command and no python36-pip package to yum install. So I start with easy_install... The docker image is then only used with users that don't have sudo rights. Let's see what can we do about missing pip. Anyway this might take a while. As a workaround of the immediate problem, create the directory before installing pip. Also, try using this to install pip: python3 -m ensurepip Note that this is also dangerous with sudo, but a bit less than easy_install. $ docker run -ti jsmigel/centos-epel /bin/bash ... [root@ea092e28ba9e /]# yum install python36 ... Installed: python36.x86_64 0:3.6.6-1.el7 Dependency Installed: python36-libs.x86_64 0:3.6.6-1.el7 Complete! [root@ea092e28ba9e /]# python3.6 -m ensurepip Looking in links: /tmp/tmpprhtejdj Collecting setuptools Collecting pip Installing collected packages: setuptools, pip Successfully installed pip-10.0.1 setuptools-39.0.1 [root@ea092e28ba9e /]# python3.6 -m pip --version pip 10.0.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6) Also: [root@ea092e28ba9e /]# python3.6 -m pip install -U pip Collecting pip Downloading https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB) 100% |################################| 1.3MB 12.1MB/s Installing collected packages: pip Found existing installation: pip 10.0.1 Uninstalling pip-10.0.1: Successfully uninstalled pip-10.0.1 Successfully installed pip-18.1 [root@ea092e28ba9e /]# python3.6 -m pip --version pip 18.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6) python3.6 -m ensurepip works python3.6 -m pip install -U pip does not. ensurepip also leaves the system in the same state as easy_intall in the old version. I can live with ensurepip perfectly fine. using easy_install was just a workaround I am glad I got rid of. Thank you! But I guess people who do have to use easy install still are in trouble. Yes, this is indeed a bug that needs to be fixed. I'm just providing workarounds. Anyway, you might be interested in https://src.fedoraproject.org/rpms/python-pip/pull-request/22 Patrick, any chance you could review the PR and test the built RPM from it? https://src.fedoraproject.org/rpms/python3-setuptools/pull-request/3 Hi Miro, sorry for pointing that out I am used to work in ticket systems where people take any excuse to close a ticket no matter what... so I tried, running in a stock centos:7 image: yum -y install epel-release && yum-config-manager --enable cr && yum install -y python36 && curl -o setuptools.rpm https://kojipkgs.fedoraproject.org//work/tasks/3669/31953669/python36-setuptools-39.2.0-2.el7.noarch.rpm && yum install setuptools.rpm && easy_install-3.6 pip This will successfully install easy_install and pip. I looked a bit deeper, setuptools now does get installed in /usr/lib/python3.6/site-packages while pip got installed in /usr/local/lib/python3.6/site-package. With the previous version, setuptools ended up in /usr/local/lib/python3.6/site-packages. But from the interpreter I can both import setuptools and pip, so both directories get checked. Given that in python we don't import modules with absolute paths, I guess this is good enough. > setuptools now does get installed in /usr/lib/python3.6/site-packages while pip got installed in /usr/local/lib/python3.6/site-package That was expected. > With the previous version, setuptools ended up in /usr/local/lib/python3.6/site-packages. That was not expected. > Given that in python we don't import modules with absolute paths, I guess this is good enough. Thanks. python3-setuptools-39.2.0-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-e29af3c9e7 python3-setuptools-39.2.0-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-e29af3c9e7 python3-setuptools-39.2.0-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report. |