Pip index-url issue with nested dependencies - python

I currently have a pip mirror installed on an internal server (this is an offline network). The url to access it is http://pypi.python.org/simple. I have created a configuration file at ~/.pip/pip.conf with the following contents:
[global]
index-url = http://pypi.python.org/simple
trusted-host = pypi.python.org
I can successfully install packages that don't have nested dependencies, such as by performing pip3 install requests. I get the output of it installing requests, idna, chardet, certifi, and urllib3 successfully. However, when I need to install something from pip that has nested dependencies, such as via pip3 install driller, I get the following output:
Collecting driller
Downloading driller-1.0.tar.gz
Collecting angr (from driller)
Downloading angr-8.19.2.4.tar.gz (758kB)
100% | | 768kB 75.7MB/s
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/pyvex/: [Errno 111] Connection refused -- Some packages may not be found!
...
It's weird to me that the error occurs as a result of attempting to reach https://pypi.python.org/simple as opposed to my local mirror that I specified via index-url at http://pypi.python.org. Additionally, if I perform pip3 install pyvex it installs just fine. Am I missing how to propagate my index-url/trusted host through the pip install command when there are nested dependencies?

I had the exact same question and got the answer in this thread on StackOverflow.
Here is the solution
Find the Python directories on your system and add the following two lines to the distutils.cfg in the folder distutils. If the config file does not exist yet, create it.
[easy_install]
index_url = blablabla

Related

pip install with flag "--index-url" and "--extra-index-url" from GitLab results in "ERROR: HTTP error 404 while getting"

We are using a private GitLab Enterprise installation for storing Python modules as described in the article PyPI packages in the Package Registry
The following command was used inside containers to install the privately hosted packages:
pip install <package_name_01> <package_name_02> \
--index-url https://<personal_access_token_name_package_01>:<personal_access_token_package_01>#gitlab.example.com/api/v4/projects/<project_id_package_01>/packages/pypi/simple \
--extra-index-url https://<personal_access_token_name_package_02>:<personal_access_token_package_02>#gitlab.example.com/api/v4/projects/<project_id_package_02>/packages/pypi/simple
As seen in the example, we use packages from different GitLab projects. Therefore, we had to specify each GitLab project as --index-url and --extra-index-url. The showed solution was working but since a few days, we receive the following error:
pip install <package_name_01> <package_name_02> \
> --index-url https://<personal_access_token_name_package_01>:<personal_access_token_package_01>#gitlab.example.com/api/v4/projects/<project_id_package_01>/packages/pypi/simple \
> --extra-index-url https://<personal_access_token_name_package_02>:<personal_access_token_package_02>#gitlab.example.com/api/v4/projects/<project_id_package_02>/packages/pypi/simple
Looking in indexes: https://<personal_access_token_name_package_01>:****#gitlab.example.com/api/v4/projects/<project_id_package_01>/packages/pypi/simple, https://<personal_access_token_name_package_02>:****#gitlab.example.com/api/v4/projects/<project_id_package_02>/packages/pypi/simple
Collecting <package_name_01>
ERROR: HTTP error 404 while getting https://gitlab.example.com/api/v4/projects/<project_id_package_01>/packages/pypi/files/55a5d545c01aee6ef5488cb18f9d19eee9d79XXXXXXX/<package_name_01>-0.0.18-py3-none-any.whl#sha256=55a5d545c01aee6ef5488cb18f9d19eee9d79XXXXXXX (from https://gitlab.example.com/api/v4/projects/<project_id_package_01>/packages/pypi/simple/<package_name_01>/) (requires-python:>=3.6)
ERROR: Could not install requirement <package_name_01>==0.0.18 from https://gitlab.example.com/api/v4/projects/<project_id_package_01>/packages/pypi/files/55a5d545c01aee6ef5488cb18f9d19eee9d79XXXXXXX/<package_name_01>-0.0.18-py3-none-any.whl#sha256=55a5d545c01aee6ef5488cb18f9d19eee9d79XXXXXXX because of HTTP error 404 Client Error: Not Found for url: https://gitlab.example.com/api/v4/projects/<project_id_package_01>/packages/pypi/files/55a5d545c01aee6ef5488cb18f9d19eee9d79XXXXXXX/<package_name_01>-0.0.18-py3-none-any.whl for URL https://gitlab.example.com/api/v4/projects/<project_id_package_01>/packages/pypi/files/55a5d545c01aee6ef5488cb18f9d19eee9d79XXXXXXX/<package_name_01>-0.0.18-py3-none-any.whl#sha256=55a5d545c01aee6ef5488cb18f9d19eee9d79XXXXXXX (from https://gitlab.example.com/api/v4/projects/<project_id_package_01>/packages/pypi/simple/<package_name_01>/) (requires-python:>=3.6)
Installing the modules separately works however...
pip install <package_name_01> --index-url https://<personal_access_token_name_package_01>:<personal_access_token_package_01>#gitlab.example.com/api/v4/projects/<project_id_package_01>/packages/pypi/simple
pip install <package_name_02> --index-url https://<personal_access_token_name_package_02>:<personal_access_token_package_02>#gitlab.example.com/api/v4/projects/<project_id_package_02>/packages/pypi/simple
Does anyone have an idea what goes wrong here?
This is a bug in GitLab, wich needs to be resolved in the future.
Link to the official GitLab issue: https://gitlab.com/gitlab-org/gitlab/-/issues/371814

Install fails with requirements.txt but works with pip install

I'm seeing some weird behavior when using requirements.txt vs. when installing directly with pip. Hoping you can shed some light on this.
This may be the same as this unanswered question: pip install -r requirements.txt fails on scipy, but works when run manually line-by-line
Python 2.7.6
Django 1.6.11
When I install mailchimp3 using requirements.txt like this:
sudo /usr/local/python/django/bin/pip install -r config/myvr/requirements.txt
The install fails and I see:
Collecting mailchimp3==2.0.3 (from -r config/myvr/requirements.txt (line 73))
2016-12-21 11:23:22,286 [salt.loaded.int.module.cmdmod][ERROR ][1759] stderr: /usr/local/python/django/local/lib/python2.7/site-packages/pip/req/req_f
ile.py:129: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
cmdoptions.check_install_build_global(options, opts)
/usr/local/python/django/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLCon
text object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more informati
on, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Could not find a version that satisfies the requirement mailchimp3==2.0.3 (from -r config/myvr/requirements.txt (line 73)) (from versions: )
No matching distribution found for mailchimp3==2.0.3 (from -r config/myvr/requirements.txt (line 73))
2016-12-21 11:23:22,286 [salt.loaded.int.module.cmdmod][ERROR ][1759] retcode: 1
However, when I install directly like this:
sudo /usr/local/python/django/bin/pip install mailchimp3==2.0.3
The install succeeds:
(django)ubuntu#dev:~/myvr$ sudo /usr/local/python/django/bin/pip install mailchimp3==2.0.3
The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting mailchimp3==2.0.3
/usr/local/python/django/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/local/python/django/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading mailchimp3-2.0.3-py2.py3-none-any.whl (83kB)
100% |████████████████████████████████| 92kB 413kB/s
Requirement already satisfied: requests in /usr/local/python/django/lib/python2.7/site-packages (from mailchimp3==2.0.3)
Installing collected packages: mailchimp3
Successfully installed mailchimp3-2.0.3
(django)ubuntu#dev:~/myvr$
This must be installed using the requirements file and not installed directly for our production environment. Any chance you have an idea of what's up here?
Do you need any other information?
The issue was that in the requirements.txt file there is a dependency on lxml and that dependency is setup to be installed without-threading so it looked like this
lxml==3.5.0 --install-option='--without-threading'
Any time --install-option (or --build-options or --global-options) are passed, that disables all use of wheels.
In the case of mailchimp3 it requires wheels to install correctly.
Our solution was to move the installation of lxml into a separate build step.
Can not go through your error message, but you can check if your requirements.txt contain packages that have dependencies on packages enlisted in same file. Suppose req file contain pack1 and pack2 if pack1 import pack2 and pack2 is called later then installation will fail. there is been problem with me and here is a similar problem on github

Could not find a version that satisfies the requirement <package>

I'm installing several Python packages in Ubuntu 12.04 using the following requirements.txt file:
numpy>=1.8.2,<2.0.0
matplotlib>=1.3.1,<2.0.0
scipy>=0.14.0,<1.0.0
astroML>=0.2,<1.0
scikit-learn>=0.14.1,<1.0.0
rpy2>=2.4.3,<3.0.0
and these two commands:
$ pip install --download=/tmp -r requirements.txt
$ pip install --user --no-index --find-links=/tmp -r requirements.txt
(the first one downloads the packages and the second one installs them).
The process is frequently stopped with the error:
Could not find a version that satisfies the requirement <package> (from matplotlib<2.0.0,>=1.3.1->-r requirements.txt (line 2)) (from versions: )
No matching distribution found for <package> (from matplotlib<2.0.0,>=1.3.1->-r requirements.txt (line 2))
which I fix manually with:
pip install --user <package>
and then run the second pip install command again.
But that only works for that particular package. When I run the second pip install command again, the process is stopped now complaining about another required package and I need to repeat the process again, ie: install the new required package manually (with the command above) and then run the second pip install command.
So far I've had to manually install six, pytz, nose, and now it's complaining about needing mock.
Is there a way to tell pip to automatically install all needed dependencies so I don't have to do it manually one by one?
Add: This only happens in Ubuntu 12.04 BTW. In Ubuntu 14.04 the pip install commands applied on the requirements.txt file work without issues.
Although it doesn't really answers this specific question. Others got the same error message with this mistake.
For those who like me initial forgot the -r: Use pip install -r requirements.txt the -r is essential for the command.
The original answer:
https://stackoverflow.com/a/42876654/10093070
I had installed python3 but my python in /usr/bin/python was still the old 2.7 version
This worked (<pkg> was pyserial in my case):
python3 -m pip install <pkg>
This approach (having all dependencies in a directory and not downloading from an index) only works when the directory contains all packages. The directory should therefore contain all dependencies but also all packages that those dependencies depend on (e.g., six, pytz etc).
You should therefore manually include these in requirements.txt (so that the first step downloads them explicitly) or you should install all packages using PyPI and then pip freeze > requirements.txt to store the list of all packages needed.
Just a reminder to whom google this error and come here.
Let's say I get this error:
$ python3 example.py
Traceback (most recent call last):
File "example.py", line 7, in <module>
import aalib
ModuleNotFoundError: No module named 'aalib'
Since it mentions aalib, I was thought to try aalib:
$ python3.8 -m pip install aalib
ERROR: Could not find a version that satisfies the requirement aalib (from versions: none)
ERROR: No matching distribution found for aalib
But it actually wrong package name, ensure pip search(service disabled at the time of writing), or google, or search on pypi site to get the accurate package name:
Then install successfully:
$ python3.8 -m pip install python-aalib
Collecting python-aalib
Downloading python-aalib-0.3.2.tar.gz (14 kB)
...
As pip --help stated:
$ python3.8 -m pip --help
...
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
To have a systematic way to figure out the root causes instead of rely on luck, you can append -vvv option of pip command to see details, e.g.:
$ python3.8 -u -m pip install aalib -vvv
User install by explicit request
Created temporary directory: /tmp/pip-ephem-wheel-cache-b3ghm9eb
Created temporary directory: /tmp/pip-req-tracker-ygwnj94r
Initialized build tracking at /tmp/pip-req-tracker-ygwnj94r
Created build tracker: /tmp/pip-req-tracker-ygwnj94r
Entered build tracker: /tmp/pip-req-tracker-ygwnj94r
Created temporary directory: /tmp/pip-install-jfurrdbb
1 location(s) to search for versions of aalib:
* https://pypi.org/simple/aalib/
Fetching project page and analyzing links: https://pypi.org/simple/aalib/
Getting page https://pypi.org/simple/aalib/
Found index url https://pypi.org/simple
Getting credentials from keyring for https://pypi.org/simple
Getting credentials from keyring for pypi.org
Looking up "https://pypi.org/simple/aalib/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/aalib/ HTTP/1.1" 404 13
[hole] Status code 404 not in (200, 203, 300, 301)
Could not fetch URL https://pypi.org/simple/aalib/: 404 Client Error: Not Found for url: https://pypi.org/simple/aalib/ - skipping
Given no hashes to check 0 links for project 'aalib': discarding no candidates
ERROR: Could not find a version that satisfies the requirement aalib (from versions: none)
Cleaning up...
Removed build tracker: '/tmp/pip-req-tracker-ygwnj94r'
ERROR: No matching distribution found for aalib
Exception information:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 357, in run
resolver.resolve(requirement_set)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 281, in _get_abstract_dist_for
req.populate_link(self.finder, upgrade_allowed, require_hashes)
File "/usr/lib/python3/dist-packages/pip/_internal/req/req_install.py", line 249, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/usr/lib/python3/dist-packages/pip/_internal/index/package_finder.py", line 926, in find_requirement
raise DistributionNotFound(
pip._internal.exceptions.DistributionNotFound: No matching distribution found for aalib
From above log, there is pretty obvious the URL https://pypi.org/simple/aalib/ 404 not found. Then you can guess the possible reasons which cause that 404, i.e. wrong package name. Another thing is I can modify relevant python files of pip modules to further debug with above log. To edit .whl file, you can use wheel command to unpack and pack.
After 2 hours of searching, I found a way to fix it with just one line of command. You need to know the version of the package (Just search up PACKAGE version).
Command:
python3 -m pip install --pre --upgrade PACKAGE==VERSION.VERSION.VERSION
Below command worked for me -
python -m pip install flask
Not always, but in some cases the package already exists. For example - getpass. It is not listed by "pip list" but it can be imported and used:
If I try to pip install getpass I get the following error:
"Could not find a version that satisfies the requirement getpass"
Try installing flask through the powershell using the following command.
pip install --isolated Flask
This will allow installation to avoide environment variables and user configuration.
If you facing this issue at the workplace. This might be the solution for you.
pip install -U <package_name> --user --proxy=<your proxy>
Pip install from pypi.org.
pip install -U -i https://pypi.org/simple package
One possible error, pip package requires python intepreter which you are not using.
I ran into the same problem, it occurred only when I ran commands from my Docker image (or Dockerfile). Finally many hours later I managed to solve it by updating my python intepreter. Pointed out that my pip-package required python>=3,7 but my Docker image was using python 3.6.
Tip: To check out if you have similar problem, just check pip package requirements and your python version. Private pip package intepreter requirements are wrote down inside setup.py or setup.cfg. Public pip packages are usuially hosted in pypi.org where you can just check intepreter requirements with your browser. To check your python intepreter version just write for example python --version or python3 --version in your console
General problem description
As other answers point out there can also be other requirements that you are not satisfying and that is why pip can not found suitable package version for you. All the requirements are wrote down in pip package documentation and can be easily readed from https://pypi.org/project/graphene-django/your-package
I got this error while installing awscli on Windows 10 in anaconda (python 3.7).
While troubleshooting, I went to the answer https://stackoverflow.com/a/49991357/6862405 and then to https://stackoverflow.com/a/54582701/6862405. Finally found that I need to install the libraries PyOpenSSL, cryptography, enum34, idna and ipaddress. After installing these (using simply pip install command), I was able to install awscli.
When I lost my internet connection, I had this error.
Since it's a pretty annoying problem that may stuck beginners for a long period of time, here I write a complete guild.
if you are running pip install PACKAGE or python -m pip install PACKAGE, and a no matching version found error reported, here's how to solve the problem.
search your package on browser, for example my package is pycypto, here I search pycypto pypi
find your package, open the link on pypi, click download file
open a python shell, import any of your installed package, for example, I have installed Pillow before.
>>> import PIL
>>> PIL.__path__
['/Applications/MAMP/htdocs/canvas/src/zzd/env/lib/python3.7/site-packages/PIL']
PACKAGE.__path__ function will gives you the side packages path where all packages should go into.
PLUS:
if you have no idea what packages you installed before, run pip list to get a list of installed packages.
after we obtain the path, open a shell, cd to the path
cd /Applications/MAMP/htdocs/canvas/src/zzd/env/lib/python3.7/site-packages/
open
unzip the downloaded file, drag it into site-packages.
cd into the downloaded directory, and run setup.py to install
cd pycrypto-2.6.1
python setup.py install
Then you should be able to import and use the package in python.
Same error in slightly different circumstances, on MacOs. Apparently setuptools versions past 45 can expose some issues and this command got me past it:
pip3 install setuptools==45
If the package is local, don't miss the relative path.
E.g.
pip install ./<pkg>
finally worked in my case, while
pip install <pkg>
yielded:
ERROR: Could not find a version that satisfies the requirement <pkg> (from versions: none)
ERROR: No matching distribution found for <pkg>
I had a problem installing pandas-1.4.3, and the problem was my python patch version. pandas-1.4.3 required python version 3.8.13 and did not work with 3.8.9:
python install -r requirements.txt # or pip install pandas==1.4.3
# -> Could not find a version that satisfies...
conda activate my_project # creates a virtual env for a new python version
conda install python=3.8.13 # installing the new python version
python --version # displays 3.8.13
pip install -r python/requirements.txt
# -> pandas installed as expected
Search in google if you find some other version of that package available
use that for example
I was getting errors using the glob so I used glob2 instead

Problems with python easy install

I have a problem using easy_install for matplotlib-venn. I'm on a windows computer using python2.7.
I'm suspecting the path is not correct but I do not know how to fix the problem.
Could anyone help me?
I'm attaching the output from trying to run the easy_install command in the CMD prompter.
C:\Python27\Scripts>easy_install matplotlib-venn
Searching for matplotlib-venn
Reading https://pypi.python.org/simple/matplotlib-venn/
Download error on https://pypi.python.org/simple/matplotlib-venn/: [Errno 11004]
getaddrinfo failed -- Some packages may not be found!
Couldn't find index page for 'matplotlib-venn' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno 11004] getaddrinfo fai
led -- Some packages may not be found!
No local packages or download links found for matplotlib-venn
error: Could not find suitable distribution for Requirement.parse('matplotlib-ve
nn')
install for matplotlib-venn package
Output from trying the pip install suggestion:
C:\Python27\Scripts>easy_install pip
Searching for pip
Best match: pip 1.4.1
Adding pip 1.4.1 to easy-install.pth file
Installing pip-script.py script to C:\Python27\Scripts
Installing pip.exe script to C:\Python27\Scripts
Installing pip.exe.manifest script to C:\Python27\Scripts
Installing pip-2.7-script.py script to C:\Python27\Scripts
Installing pip-2.7.exe script to C:\Python27\Scripts
Installing pip-2.7.exe.manifest script to C:\Python27\Scripts
Using c:\python27\lib\site-packages
Processing dependencies for pip
Finished processing dependencies for pip
C:\Python27\Scripts>pip install matplotlib-venn
Downloading/unpacking matplotlib-venn
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement matplotlib-venn
Cleaning up...
No distributions at all found for matplotlib-venn
Storing complete log in C:\Users\jherman8\pip\pip.log
Based on
Download error on https://pypi.python.org/simple/matplotlib-venn/: [Errno 11004] getaddrinfo failed
and
Cannot fetch index base URL https://pypi.python.org/simple/
it seems that your have network issue. Do you run your machine behind a firewall or a proxy?
For easy_install to work behind proxy, you have to setup needed environments, for example
set http_proxy="user:password#server:port"
set https_proxy="user:password#server:port"
For pip you can use -proxy argument. More details on pip usage behind proxy see in this thread: How to use pip on windows behind an authenticating proxy
I think this is your solution
easy_install pip
pip install matplotlib-venn
No module matplotlib-venn in easy_install
And for future, use pip for install any package for python.
student#student-WIV68105-0080:~$ **sudo apt-cache search rtree**
libcneartree-dev - Library and headers for solving the Nearest Neighbor Problem
libcneartree5 - Library for solving the Nearest Neighbor Problem
student#student-WIV68105-0080:~$ **sudo apt-get install libcneartree-dev libcneartree5**
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libcvector2
The following NEW packages will be installed:
libcneartree-dev libcneartree5 libcvector2
For me the same error occurred for rtree package and I did the cache search and installed the liraries
In-case of cloudera box if you are trying then this will work as reaised in bugzile.
https://bugzilla.redhat.com/show_bug.cgi?id=1510444
It works for my cloudera vm jut follow the insteruction and then try to isntall by easy_install.
# easy_install -i https://pypi.python.org/simple stitches Searching for stitches Reading https://pypi.python.org/simple/stitches/ Best match: stitches 0.11 Downloading https://pypi.python.org/packages/9d/73/681005f0f0fb9483f0d94547a35059c776144fc998780b9ef00167a50f3d/stitches-0.11.tar.gz#md5=0ac0b6e418767e6ec5cf684460d1972f Processing stitches-0.11.tar.gz Running stitches-0.11/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ZMIU8w/stitches-0.11/egg-dist-tmp-82ctsZ zip_safe flag not set; analyzing archive contents... stitches.connection: module references file Adding stitches 0.11 to easy-install.pth file
Installed /usr/lib/python2.6/site-packages/stitches-0.11-py2.6.egg Processing dependencies for stitches ... ... Searching for pynacl>=1.0.1 Reading https://pypi.python.org/simple/pynacl/ Best match: PyNaCl 1.2.0 Downloading https://pypi.python.org/packages/fa/38/0f35ec4beb6562f1abfa07914db1cea978e93da409ba6293f810d9e677d6/PyNaCl-1.2.0.tar.gz#md5=7a31e95f5f457184b1660b71d6808b19 Processing PyNaCl-1.2.0.tar.gz Running PyNaCl-1.2.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-a0vNJS/PyNaCl-1.2.0/egg-dist-tmp-QYvAk9 Checking .pth file support in . /usr/bin/python -E -c pass Searching for cffi>=1.4.1 Reading http://pypi.python.org/simple/cffi/ Couldn't find index page for 'cffi' (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 cffi>=1.4.1 error: Could not find suitable distribution for Requirement.parse('cffi>=1.4.1')
So the only solution is hacking the source code:
sed -i s,http://pypi.python.org,https://pypi.python.org, /usr/lib/python2.6/site-packages/setuptools/command/easy_install.py
sudo

getting updated distribute via pip requirements file

im using pip requirements file for the dependencies with virtualenv. im using ubuntu10.04LTS now the problem has come up with djangorestframework, after adding it in .pip file
while downloading the requirements #URLObject error occurs and says
Downloading/unpacking URLObject>=0.6.0 (from djangorestframework->-r /var/lib/myproj/base.pip (line 26))
Using download cache from /usr/local/pipcache/http%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2FU%2FURLObject%2FURLObject-2.0.1.tar.gz
Running setup.py egg_info for package URLObject
The required version of distribute (>=0.6.24) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'.
(Currently using distribute 0.6.10 (/var/lib/myproj/.ve/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg))
Complete output from command python setup.py egg_info:
The required version of distribute (>=0.6.24) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U distribute'
(Currently using distribute 0.6.10 (/var/lib/myproj/.ve/lib/python2.6/site-packages/distribute-0.6.10-py2.6.egg))
my pip requirement file is as follows:
virtualenv
django
distribute
django-permissions
django-storages
django-sentry
#django-db-utils
PIL
#Required for APIs
djangorestframework
i have even tried by adding distribute-0.6.25 but in vain how do i upgrade distribute via pip requirements file.
I just hit the same issue.
Solved by running:
pip install -U distribute==0.6.25
I don't think you can update it via the requirements file because requirements are installed at once and not one by one.
if you need distribute to be 0.6.25 version, just specify it in the requirements:
virtualenv
django
distribute==0.6.25
django-permissions
django-storages
django-sentry
#django-db-utils
PIL
#Required for APIs
djangorestframework

Categories

Resources