14

I am having trouble configuring my pip.conf file to stipulate that PIP should look for downloads from https://pypi.python.org/simple/ rather than http://pypi.python.org/simple/

I have a related question posted PIP Could not find any downloads that satisfy the requirement SQLAlchemy where a couple of people diagnosed what was going wrong. However I am having trouble putting in place the solution.

I opend my pip.conf file located at /home/user/.pip/pip.conf using the pip config file documentation I added the below. There is nothing else in the file.

[global]
timeout = 60
find-links = https://pypi.python.org/simple/

[install]
find-links = https://pypi.python.org/simple/

After saving an exiting there is no change. I still cannot run commands such as pip install

$ sudo pip install SQLAlchemy
Downloading/unpacking SQLAlchemy
  Cannot fetch index base URL http://pypi.python.org/simple/
  Could not find any downloads that satisfy the requirement SQLAlchemy
No distributions at all found for SQLAlchemy
Storing complete log in /home/user/.pip/pip.log 

My setup

  • Ubunto 12.04 VM
Community
  • 1
  • 1
Deepend
  • 4,057
  • 17
  • 60
  • 101

4 Answers4

17

You should use index-url = https://pypi.python.org/simple/ rather than find-links in your config. This will replace the default rather than just adding another option (which is what find-links does).

Midnighter
  • 3,771
  • 2
  • 29
  • 43
  • Worked! My logfile is now saying "Getting page 'https:.....'" Its still not working but this did answer the question I asked. – Deepend Jun 22 '14 at 17:08
13

Use index-url = to replace package index.

Use find-links = to append entries.

From latest guide: https://pip.pypa.io/en/stable/topics/configuration/

The new default configuration file is: $HOME/.config/pip/pip.conf

Legacy per-user configuration file which is also respected:

On Unix and macOS the configuration file is: $HOME/.pip/pip.conf

Aaron Shang
  • 130
  • 2
  • 6
1

Update from 2011-04-04 version to latest one

pip version 1.0 is fairly old, pypi shows date 2011-04-04. Consider installing latest version.

Since 2011 there were some significant changes (security fixes, support for wheel format...)

I would first remove completely the pip installed by apt-get, incl. cleaning whatever is in directories around. And then install using get-pip.py as described on pypa.

I know, that it is often recommended following Linux distribution packages, but with pip it is simply not practical.

Ivo
  • 5,378
  • 2
  • 18
  • 18
Jan Vlcinsky
  • 42,725
  • 12
  • 101
  • 98
  • Would un-installing and reinstalling PIP have any effect on packages already installed and virtual environments? – Deepend Jun 22 '14 at 17:15
  • 1
    @Deepend Reinstalling pypi shall not affect other packages. I have reinstalled pypi few times on few servers with Ubuntu 12.04 and all was working well without problems. `pip` is a tool for installing, but the presence of `pip` is not needed for the installed packages to run. – Jan Vlcinsky Jun 22 '14 at 17:23
-1

I think your changes are not being used.

pip install --find-links=https://pypi.python.org/simple/ SQLAlchemy works on my system.

. The log says it is checking https://pypi.python.org/simple.

iamkhush
  • 2,562
  • 3
  • 20
  • 34