Skip to content

--find-links doesn't find setuptools package as depenency #5268

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

Closed
amit7itz opened this issue Apr 17, 2018 · 10 comments
Closed

--find-links doesn't find setuptools package as depenency #5268

amit7itz opened this issue Apr 17, 2018 · 10 comments
Labels
auto-locked Outdated issues that have been locked by automation type: support User Support

Comments

@amit7itz
Copy link

amit7itz commented Apr 17, 2018

  • Pip version: 10.0.0
  • Python version: 3.4.5
  • Operating system: CentOS 7.4.1708

Description:

Hi,
I'm trying to install python packages from a directory.
Since I upgraded from pip 9.0.3 to pip 10.0.0, the installation command fails with an error that it doesn't find setuptools, although it is already installed, and it exists in the same directory where the package we install exists.

What I've run:

Trying to install pytest from my packages directory fails.
(venv) [root@centos_slave1 ctd]# python3 -m pip install --no-binary :all: --find-links mypackages --no-index pytest==3.4.0
Looking in links: mypackages
Collecting pytest==3.4.0
Could not find a version that satisfies the requirement setuptools (from versions: )
No matching distribution found for setuptools

Although the setuptools package exists in the directory
(venv) [root@centos_slave1 ctd]# ls ./mypackages/
attrs-17.4.0.tar.gz py-1.5.2.tar.gz pytest-benchmark-3.1.1.tar.gz pytest-flask-0.10.0.tar.gz pytest-xdist-1.22.0.tar.gz six-1.10.0.tar.gz
pluggy-0.6.0.tar.gz pytest-3.4.0.tar.gz pytest-cov-2.5.1.tar.gz pytest-forked-0.2.tar.gz setuptools-39.0.1.zip six-1.11.0.tar.gz

And the setuptools is already installed
(venv) [root@centos_slave1 ctd]# pip freeze --all
pip==10.0.0
setuptools==39.0.1
six==1.11.0
wheel==0.31.0

If I downgrade to pip 9.0.3, the installation succeed.
(venv) [root@centos_slave1 ctd]# pip install pip==9.0.3
Collecting pip==9.0.3
Downloading https://files.pythonhosted.org/packages/ac/95/a05b56bb975efa78d3557efa36acaf9cf5d2fd0ee0062060493687432e03/pip-9.0.3-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 1.5MB/s
Installing collected packages: pip
Found existing installation: pip 10.0.0
Uninstalling pip-10.0.0:
Successfully uninstalled pip-10.0.0
Successfully installed pip-9.0.3
You are using pip version 9.0.3, however version 10.0.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(venv) [root@centos_slave1 ctd]# python3 -m pip install --no-binary :all: --find-links mypackages --no-index pytest==3.4.0
Collecting pytest==3.4.0
Collecting py>=1.5.0 (from pytest==3.4.0)
Requirement already satisfied: six>=1.10.0 in /opt/icsranger/venv/lib/python3.4/site-packages (from pytest==3.4.0)
Requirement already satisfied: setuptools in /opt/icsranger/venv/lib/python3.4/site-packages (from pytest==3.4.0)
Collecting attrs>=17.2.0 (from pytest==3.4.0)
Collecting pluggy<0.7,>=0.5 (from pytest==3.4.0)
Skipping bdist_wheel for pytest, due to binaries being disabled for it.
Skipping bdist_wheel for py, due to binaries being disabled for it.
Skipping bdist_wheel for attrs, due to binaries being disabled for it.
Skipping bdist_wheel for pluggy, due to binaries being disabled for it.
Installing collected packages: py, attrs, pluggy, pytest
Running setup.py install for py ... done
Running setup.py install for attrs ... done
Running setup.py install for pluggy ... done
Running setup.py install for pytest ... done
Successfully installed attrs-17.4.0 pluggy-0.6.0 py-1.5.2 pytest-3.4.0

@vfigueiro
Copy link

vfigueiro commented Apr 23, 2018

Having the same issue, but not using --find-links, just trying to install any recent pytest

@chewi
Copy link

chewi commented Apr 23, 2018

In our case, this was because we have a whitelisting HTTP proxy and hadn't added pypi.org, which I guess is a new location. We previously had pypi.python.org.

@benoit-pierre
Copy link
Member

@chewi: that's an entirely different issue; OP is using --no-index.

@amit7itz: I believe your hitting the limitations of PEP 518 support; installing building dependencies is limited to binaries. Running with #5286 should make it clearer (to install: pip install https://github.com/benoit-pierre/pip/archive/improve_pep518_build_requirements_handling.zip) it's the Installing build dependencies phase, and the pip sub-command is disabling source installs.

For now, I suggest disabling build isolation (--no-build-isolation).

@amit7itz
Copy link
Author

Hi @benoit-pierre, and thanks for your response.
I tried installing the improve_pep518_build_requirements_handling.zip, and it failed too, here is the output:
(venv) [root@centos_slave1 ctd]# python3 -m pip install --no-binary :all: --find-links mypackages --no-index pytest==3.4.0
Looking in links: mypackages
Collecting pytest==3.4.0
Installing build dependencies ... error
Complete output from command /tmp/venv/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-fl1avb3h --no-warn-script-location --only-binary :all: --no-index --find-links mypackages -- setuptools wheel:
Looking in links: mypackages
Collecting setuptools
Could not find a version that satisfies the requirement setuptools (from versions: )
No matching distribution found for setuptools


Command "/tmp/venv/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-fl1avb3h --no-warn-script-location --only-binary :all: --no-index --find-links mypackages -- setuptools wheel" failed with error code 1 in None

I also tried the regular pip edition with the the --no-build-isolation, and it did work!
(venv) [root@centos_slave1 ctd]# python3 -m pip install --no-binary :all: --find-links mypackages --no-index pytest==3.4.0 --no-build-isolation
Looking in links: mypackages
Collecting pytest==3.4.0
Collecting py>=1.5.0 (from pytest==3.4.0)
Collecting six>=1.10.0 (from pytest==3.4.0)
Requirement already satisfied: setuptools in /tmp/venv/lib/python3.6/site-packages (from pytest==3.4.0) (39.0.1)
Collecting attrs>=17.2.0 (from pytest==3.4.0)
Collecting pluggy<0.7,>=0.5 (from pytest==3.4.0)
Skipping bdist_wheel for pytest, due to binaries being disabled for it.
Skipping bdist_wheel for py, due to binaries being disabled for it.
Skipping bdist_wheel for six, due to binaries being disabled for it.
Skipping bdist_wheel for attrs, due to binaries being disabled for it.
Skipping bdist_wheel for pluggy, due to binaries being disabled for it.
Installing collected packages: py, six, attrs, pluggy, pytest
Running setup.py install for py ... done
Running setup.py install for six ... done
Running setup.py install for attrs ... done
Running setup.py install for pluggy ... done
Running setup.py install for pytest ... done
Successfully installed attrs-17.4.0 pluggy-0.6.0 py-1.5.2 pytest-3.4.0 six-1.11.0

Thanks very much!
Does this helping you understand the issue?
Do you have any idea when will a fix will be released?

@benoit-pierre
Copy link
Member

I should have been clearer: improve_pep518_build_requirements_handling.zip is not expected to fix the issue, but at least the failure is clearer (I think!).

@pradyunsg
Copy link
Member

This is due to hitting the limitations of the current support for PEP 518.

These limitations likely will be relaxed in the next release, in July.

@pradyunsg
Copy link
Member

Closing since this issue seems to have been resolved.

@pradyunsg pradyunsg added type: support User Support S: needs triage Issues/PRs that need to be triaged labels May 10, 2018
@pradyunsg pradyunsg removed the S: needs triage Issues/PRs that need to be triaged label Jun 11, 2018
@amit7itz
Copy link
Author

@pradyunsg this issue still happens.. it should be reopened, the given solution is just a workaround.

@pfmoore
Copy link
Member

pfmoore commented Jul 13, 2018

@amit7itz Have you tested the issue with the current development version of pip? That's what we're saying has resolved the issue (and that code will be released soon as the next version of pip).

@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation type: support User Support
Projects
None yet
Development

No branches or pull requests

6 participants