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

pip behaves differently with command line vs. command file #3279

Closed
CMTaylor opened this issue Dec 2, 2015 · 2 comments
Closed

pip behaves differently with command line vs. command file #3279

CMTaylor opened this issue Dec 2, 2015 · 2 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@CMTaylor
Copy link

CMTaylor commented Dec 2, 2015

To better manage the versions of open source software packages used in our Test Automation, we keep our own local copy of install files and point pip to this location. For example, using command-line only to install Robot Framework we can do:

Q:\TestAutomation\Integration\Common\PC>pip install --ignore-installed --no-index --find-links . --find-links ..\PlatformIndependent robotframework
Ignoring indexes: https://pypi.python.org/simple
Collecting robotframework
Installing collected packages: robotframework
  Running setup.py install for robotframework
Successfully installed robotframework-2.9.2

Since we install MANY packages this way, we prefer to use a pip command file, but when we do so we get:

Q:\TestAutomation\Integration\Common\PC>pip install --ignore-installed -r pipCommon_Reqts.txt
Collecting robotframework (from -r pipCommon_Reqts.txt (line 4))
  The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'.
  Could not find a version that satisfies the requirement robotframework (from -r pipCommon_Reqts.txt (line 4)) (from versions: )
No matching distribution found for robotframework (from -r pipCommon_Reqts.txt (line 4))

Here are the top lines from the pipCommon_Reqts.txt file:

#
# pip Requirements file for installing or upgrading Common
# Test Automation libraries on a PC platform.
#
# Ignore the PyPi site on the web
#
--no-index
#
# Local locations for Common Test Automation Libraries
#
--find-links .
--find-links ..\PlatformIndependent
#
# List the Common Test Automation Libraries to be installed
#
robotframework

Trying the "--trusted-host None" workaround suggested in the error message, we get the same:

Q:\TestAutomation\Integration\Common\PC>pip install --ignore-installed --trusted-host None -r pipCommon_Reqts.txt
Collecting robotframework (from -r pipCommon_Reqts.txt (line 4))
  The repository located at None is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host None'.
  Could not find a version that satisfies the requirement robotframework (from -r pipCommon_Reqts.txt (line 4)) (from versions: )
No matching distribution found for robotframework (from -r pipCommon_Reqts.txt (line 4))
  1. Why does a reference to finding files at . and ..\PlatformIndependent work on the command line but not from a command file?
  2. Why does the suggested workaround of --trusted-host None not work at all?
@xavfernandez
Copy link
Member

  1. This certainly comes from the relative --find-links ..\PlatformIndependent
    cf https://github.com/pypa/pip/blob/7.1.2/pip/req/req_file.py#L196-L204
    which ends up adding a non-existent path as find-links
    which leads to 2.
  2. --trusted-host None is a symptom of 1. through a similar issue as in Unhelpful error message when --find-links is a non-existent file path (without file:// scheme) #2968

@dstufft
Copy link
Member

dstufft commented Mar 24, 2017

Closing this. It is a duplicate of #2968 which was fixed in #3289.

@dstufft dstufft closed this as completed Mar 24, 2017
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 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
Projects
None yet
Development

No branches or pull requests

3 participants