Pip not installing anything - python

When I do
pip install Flask or
pip install click or
pretty much pip install <anything> returns the same error :
Could not find a version that satisfies the requirement Flask (from versions: ) No matching distribution found for Flask
Same error for any virtual environment I may have created.
I'm on Mac OS, using Python 3.4.

Upgrade pip:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
Latest version is 10+, check your version using pip --version

Related

How can I change pip version

I'm using python3.8.6 and I need to upgrade to 3.9.x. After upgrade the python, myproject.py cannot find a module that already installed using pip3 install opencv-python.
when run python3 myproject.py occurs error that ModuleNotFoundError tensorflow, and tensorflow should be 2.5.x so I'm trying to install python 3.9.x.
pip --version shows pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
How can I change that (python3.8) to (python3.9)?
sorry for my bad English..
python -m pip install –upgrade pip.
If you type pip list it will show you every package installed and should say something like WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via this command:
c:\users\x\python.exe -m pip install --upgrade pip

Could not find a version that satisfies the requirement mediapipe

Environment: Debian, Debian GNU/Linux, 10 (buster), amd64 built on 20210609, supports Shielded VM features.
Platform: Google cloud compute engine
Python version: Python 3.7.3
pip3 version: pip 18.1
command: pip3 install mediapipe
result:
Collecting mediapipe
Could not find a version that satisfies the requirement mediapipe (from versions: )
No matching distribution found for mediapipe
I have also tried to install it by downloading .whl file of it
command: pip3 install mediapipe-0.8.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
respose:
mediapipe-0.8.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl is not a supported wheel on this platform.
It seems that mediapipe has some Incompatibilities found with python > 3.7.0. There are issues with python 3.9+, or with python 32-bit (rather than 64)
My suggestion is to downgrade python version to 3.6 using conda. We will create a python environment with the suggested version 3.6:
$ sudo apt install wget
$ wget https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh
$ chmod +x Anaconda3-2021.05-Linux-x86_64.sh
$ ./Anaconda3-2021.05-Linux-x86_64.sh
$ conda install python=3.6
$ conda create --name py36 python=3.6
$ conda activate py36
$ pip install mediapipe
There are multiples ways to solve this, but I have reproduced in your exactly same environment and it works.
You need to install 64-bit python. just uninstall the 32bit python and install
64-bit version of python from:
https://www.python.org/downloads/
Maker sure to check the "Add to PATH" checkbox during installation.
After installing, you can run pip command and mediapipe will be installed smoothly.
pip install mediapipe

uninstalling pip3 on mac

I am trying to get the installation right with python 3, pip and pip3. I am working on a mac and by default. I have Python 2.7.10
python -V
Python 2.7.10
python3 -V
Python 3.5.1
What is the correct order of installation commands to install python3 pip and pip3 so that both pip and pip3 can be linked to python3?
This what I get when I try to see what versions I already have:
$ pip -V
-bash: /usr/local/bin/pip: No such file or directory
$ pip3 -V
pip 7.1.2 from /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (python 3.5)
I need to get this right so that I can install numpy afterward because now with what I have above this is what I get:
$ pip3 install numpy
Collecting numpy
Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy
I have Solved it. as #keithpjolley suggested. I installed anaconda, launched it, and I used the command:
conda install numpy
I let it solve the environment. It gave me an older version of numpy at first so I upgraded:
conda install numpy=1.13
Now everything is working with my code.

Command "pip3 install --user guizero" fails: "No matching distribution found"

I have to install the module guizero for a piece of Python homework I've been given but it's not working.
This is all on Terminal on my Mac, version 10.7.5
People have said that I go to Library/Python but this is another problem. My MAC doesn't show me any folders named Python in Library. This is what the Library Folder looks like:
Library Folder
The command I'm using is
pip3 install --user guizero
and I get this error:
Could not find a version the satisfies the requirement guizero (from versions: )
No matching distribution found for guizero
Can anyone help with this?!
Try to update your pip version:
pip install --upgrade pip
Or pip install guizero version==0.2.1
Pip can't just magically invent what guizero is. You need to download guizero-0.2.1-py3-none-any.whl from https://pypi.python.org/pypi/guizero. Save it in your Library/Python/2.5/site-packages (replace 2.5 with your version) folder and then type pip install guizero-0.2.1-py3-none-any.whl in the terminal (typing guiz and tab twice should auto complete the file name for you)
EDIT
First install easy_install
curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python
Then install pip
sudo easy_install pip
You can now install any module using
pip install guizero

Unable to install Twisted on CentOS server

I've been searching the web for ways to solve this issue but nothing works.
I have a web server with CentOS 6.7 and I've successfully installed python 2.7.10 on it (it comes with version 2.6.6)
I followed up to step two in this site: https://cpaneltips.com/install-python-2-7-python-3-x-centos-cpanel/
I then installed virtualenv (using pip) and created another directory called "news"
Installed virtualenv and activated it so I have a python 2.7.10 environment. I ran "pip install scrapy"
But I have been getting this frustrating error:
Could not find a version that satisfies the requirement Twisted>=10.0.0 (from scrapy) (from versions: )
Some externally hosted files were ignored as access to them may be unreliable (use --allow-external Twisted to allow).
No matching distribution found for Twisted>=10.0.0 (from scrapy)
I then ran "pip install --allow-external scrapy scrapy"
still doesn't work... What am I missing?
wget https://pypi.python.org/packages/source/T/Twisted/Twisted14.0.0.tar.bz2#md5=9625c094e0a18da77faa4627b98c9815 --no-check-certificate
tar -vxjf Twisted-14.0.0.tar.bz2
cd Twisted-14.0.0
python setup.py install
pip install scrapy
It's clear you need twisted, you can firstly install twisted in your virtualenv:
pip install twisted
and then install scrapy:
pip install scrapy
This worked for me:
wget https://files.pythonhosted.org/packages/12/2a/e9e4fb2e6b2f7a75577e0614926819a472934b0b85f205ba5d5d2add54d0/Twisted-18.4.0.tar.bz2
tar -vxjf Twisted-18.4.0.tar.bz2
cd Twisted-18.4.0
python setup.py install
pip install scrapy

Categories

Resources