pip can't find downloads - python

pip used to word just fine, suddenly it stopped working, no matter what I try to download I get this message:
Downloading/unpacking django-grappelli
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement django-grappelli
Cleaning up...
No distributions at all found for django-grappelli
Storing complete log in /tmp/tmpUFetT_
this happens no matter what package I try to download, and it used to work up until around 2 days ago.
my setup is: os-x running a vagrant with precise64 running virtualenv

Can you access the internet on that vagrant machine? Try pinging:
$ ping pypi.python.org
and see if you receive a response.

Restarted vagrant, I guess there was some problem with the network.

Related

Local VS Code errors when GitHub codespaces doesn't

When I am using github codespaces I can pip install -r requirements.txt perfectly fine with no errors. I decided I want to use my local machine for one project I was working on an now I am running into the error:
ERROR: Could not find a version that satisfies the requirement torch>=1.2.0 (from versions: none)
ERROR: No matching distribution found for torch>=1.2.0
Also, wget does not work on my local machine either but does work in codespaces. When I run it on my local machine this shows up instead of downloading.
Reading web response
Reading response stream... (Number of bytes read: some number that is ascending quickly)
I am using python 3.10.4.
Any help would be appreciated, thanks.
I've tried switching my Python version and manually installing from their website link but for some reason it didn't work.

Error installing mysqldb: Could not find a version that satisfies the requirement flask-mysqldb

The error i receive
I get this error trying to install mysqldb with pip. I got a response that I damaged the python files and should remove and re-install python on a different website. So I removed python via the control panel and downloaded it again. I'm not sure if it's enough or is it the right way to go but the issue still remains.
By the way, I installed python in a different folder before and then changed it manually by moving the files by dragging them, could that be the reason the files are damaged.
From the error that you receive seems that you have connection error and for that reason you cannot fetch the repository. Try to install ssl module with pip install ssl. Because if you look the first warning you can see this pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

OpenCV installation failure on windows

Hi I am trying to install opencv on windows. I am using python version 3.7.3. I have tried the installation tutorials using pip, conda and also followed steps outlined in the documentation:https://www.learnopencv.com/install-opencv-4-on-windows/. But no success. I am getting the same error regardless of the approach.
Fetching package metadata ...
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/a
naconda/win-64/repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'repo.anaconda.com\', port=443): Max retries exceeded with url: /pkgs/main/win-64/current_repodata.json (Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'tls_process_server_certificate\', \'certificate verify failed\')])")))'))
ERROR: Could not find a version that satisfies the requirements dlib(from versions:none)
ERROR: No matching distribution found for dlib
any suggestions on how to solve this issue.
Looks like Conda installer can't verify SSL certificate.
As a workaround you can use a common way of installing Python packages using pip in OS terminal if you already have Python and pip installed.
Packages for standard desktop environments (Windows, macOS, almost any GNU/Linux distribution)
run pip install opencv-python if you need only main modules
run pip install opencv-contrib-python if you need both main and contrib
modules (check extra modules listing from OpenCV documentation)
After trying number of solutions seen online, I was able to resolve the issue.
conda install opencv worked for me. If anyone gets the same issue, refer to this document for reference. It worked for me and hopefully it works for you as well. The link to the document is: http://mathalope.co.uk/2015/05/07/opencv-python-how-to-install-opencv-python-package-to-anaconda-windows/
Its seems your network is not allowing you to access data from command line, we often see these types of issues when we are using office closed network.
In most cases when we disconnect our machines from office network (or take help from IT team to by pass closed network), pip install starts working.
Can you check if running " pip install pandas" also gives you same error, if so then its definitely network issue.

Scrapy installation fails when collecting Twisted / Centos 7

So guys, I just made a fresh installation of Python 3.6 on Centos 7. Created a virtual environment, when I run pip install scrapy, it starts collecting few other dependencies, but fails when it comes to Twisted without returning any error at all. It just freezes and nothing ever happens.
Collecting Twisted>=13.1.0 (from scrapy)
Using cached Twisted-17.9.0.tar.bz2
I've been looking into this error since yesterday, looks like error could be related to Twisted's tar.bz2 extension. I'm new to linux environment and Python, have successfully installed Scrapy on Windows a few months ago using the same pip install scrapy method. But right now, I have no clue how to proceed.
That's the guide I followed to install Python on Centos7.
https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-centos-7
Could someone please point me in the right direction? Could it really be related to Twisted's compression method? If so, how can I find a way around this issue?
Huge thanks in advance.
Couldn't figure out how to get it extract bz2, so ended up installing Twisted and its dependencies manually. For future reference;
Download latest Twisted here
Extract the file
cd to twisted/src/Twisted.egg-info
Run pip install -r top_level.txt. This will install Twisted's dependencies.
python setup.py install
That's it. You can now run pip install scrapy.

Installing packages using pip give SSL error

I recently started learning Python, am new to Python but not to programming. I have four machines on which I was able to install the Django and Python seamlessly. On the fifth machine that is a Mac Book Pro OS 10.6.8 I am able to install Django (or for that matter any other package) for Python2.6 but get the following error if I try it for Python 3.4.1
Downloading/unpacking django
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement django
Cleaning up...
No distributions at all found for django
Storing debug log for failure in /Users/himmy/.pip/pip.log
I tried searching the web and the closest I found was
Can't Install `pip` for `python 3.3` but worked fine for `python 2.7`
which doesn't really solve the problem.
Thanks in Advance
Per a comment by the OP:
Downgrading pip to version 1.2 solves the problem. The easiest way to
achieve this is:
curl -O pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz tar xvfz pip-1.2.1.tar.gz cd pip-1.2.1 python setup.py install

Categories

Resources