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 install fails to install cryptography against internal PyPI mirror #1803

Closed
gmjosack opened this issue Mar 30, 2015 · 9 comments
Closed

Comments

@gmjosack
Copy link

I install/build my packages off of an internal mirror. For most packages this works fine, however the cryptography project seems to reach out to the internet to find its dependencies.

# Setup a clean virtualenv
gary@private-ip-host:~$ mkvirtualenv --no-site-packages crypto-test
New python executable in crypto-test/bin/python2.7
Also creating executable in crypto-test/bin/python
Installing setuptools............done.
Installing pip...............done.

# Install cryptography package that's currently on PyPI. My pip config points
# to an internal mirror and this host can't route to the Internet.
(crypto-test)gary@private-ip-host:~$ pip install cryptography-0.8.1.tar.gz
Ignoring indexes: http://pypi.python.org/simple/
Unpacking ./cryptography-0.8.1.tar.gz
  Running setup.py egg_info for package from file:///home/gary/cryptography-0.8.1.tar.gz
# <snip pip output>
Installing collected packages: pyasn1, six, enum34, cffi, cryptography, pycparser

  Running setup.py install for cryptography
    Download error: [Errno 110] Connection timed out -- Some packages may not be found!
    Couldn't find index page for 'pycparser' (maybe misspelled?)
    Download error: [Errno 110] Connection timed out -- Some packages may not be found!
    No local packages or download links found for pycparser

If you install the dependencies from the mirror first then the package installs fine:

(crypto-test)gary@private-ip-host:~$ pip install pyasn1 six enum34 cffi pycparser cryptography-0.8.1.tar.gz
# <snip pip output>
Successfully installed pyasn1 six enum34 cffi pycparser cryptography
Cleaning up...
@reaperhulk
Copy link
Member

/cc @dstufft as the mysteries of setuptools/pip are beyond my ken.

jathanism added a commit to jathanism/nsot that referenced this issue Mar 30, 2015
+ This is so that enum34 (dependency of cryptography) can be properly
  installed using an internal PyPI mirror (See:
  pyca/cryptography#1803)
@dstufft
Copy link
Member

dstufft commented Mar 30, 2015

Most likely you're not pointing setuptools at your internal index as well, for setup_requires pip doesn't actually handle those (yet!) setuptools does, so it's going to reach out to what it thinks the index should be.

jathanism added a commit to jathanism/nsot that referenced this issue Mar 30, 2015
+ This is so that enum34 (dependency of cryptography) can be properly
  installed using an internal PyPI mirror (See:
  pyca/cryptography#1803)
+ Removed six from requirements-dev.txt
+ Bumped version to differentiate these underlying changes.
@gmjosack
Copy link
Author

Is it necessary to list all of your install_requires in setup_requires? Currently they are the same list of dependencies. We've circumvented this by just explicitly listing cryptographys dependencies explicitly earlier in our requirements.txt file.

Feel free to close this if it's just expected to be circumvented by the user. Since you seem to be more familiar with pip/setuptools than me, do you have any input on how to point setuptools at the index through the pip command line?

@dstufft
Copy link
Member

dstufft commented Mar 30, 2015

In general? No you don't need to list them all. Cryptography does because of the way that cffi currently works.

There's no CLI method that I'm aware of for settings the index, there is a config file in the current user's home directory though.

@gmjosack
Copy link
Author

Alright, thanks for the input! I'll go ahead an close this.

@hs312205
Copy link

hs312205 commented Dec 8, 2017

I couldn't find right Ansible package for RedHat Linux 6.9,

Tried to make rpm by myself but getting errors:

Installed /usr/lib/python2.6/site-packages/ansible-2.5.0-py2.6.egg
Processing dependencies for ansible==2.5.0
Searching for cryptography
Reading http://pypi.python.org/simple/cryptography/
Couldn't find index page for 'cryptography' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for cryptography
error: Could not find suitable distribution for Requirement.parse('cryptography')
make: *** [install] Error 1

Please help.
Dennis

@hs312205
Copy link

hs312205 commented Dec 8, 2017

I can browser this http://pypi.python.org/simple/cryptography/ and disabled firewall but make rpm still doesn't work

@hs312205
Copy link

hs312205 commented Dec 8, 2017

Is there epel-release-6-9.noarch.rpm which has the Ansible 2.x?

@alex
Copy link
Member

alex commented Dec 9, 2017

You are using a version of pip and/or setuptools that is too old. See https://mail.python.org/pipermail/distutils-sig/2017-October/031712.html for more details.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

5 participants