pip is refusing to install anything - python

So I'm trying to install twillio but when I try to install it it throws this error:
MY_DEVICE_NAME:~ MY_NAME$ pip install twillio
Collecting twillio
Could not find a version that satisfies the requirement twillio (from versions: )
No matching distribution found for twillio
You are using pip version 10.0.0b2, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
MY_DEVICE_NAME:~ MY_NAME$ pip install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl
matplotlib 1.3.1 requires nose, which is not installed.
matplotlib 1.3.1 requires tornado, which is not installed.
matplotlib 1.3.1 has requirement numpy>=1.5, but you'll have numpy 1.8.0rc1 which is incompatible.
Installing collected packages: pip
Found existing installation: pip 10.0.0b2
Uninstalling pip-10.0.0b2:
You are using pip version 10.0.0b2, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
After which I just get stuck in an infinite loop. so what should I do?

You made a small mistake
pip install twilio
You were trying pip install twillio

Use the following:-
pip install --upgrade pip
or
python -m pip install --upgrade pip

Related

How to upgrade pip in cmd? [duplicate]

This question already has an answer here:
Pip upgrade in virtual environment access denied
(1 answer)
Closed 4 months ago.
I'm trying to install NumPy in cmd. Numpy has been installed but a warning to upgrade the pip version appears i,e
WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
You should consider upgrading via the 'C:\Users\test\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip' command.
I used "upgrade pip" command but it didn't work i,e
C:\Users\test>pip install --upgrade pip
Requirement already satisfied: pip in c:\users\test\appdata\local\programs\python\python310\lib\site-packages (22.0.4)
Collecting pip
Downloading pip-22.3-py3-none-any.whl (2.1 MB)
---------------------------------------- 2.1/2.1 MB 54.0 kB/s eta 0:00:00
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 22.0.4
Uninstalling pip-22.0.4:
Successfully uninstalled pip-22.0.4
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\Users\\test\\AppData\\Local\\Temp\\pip-uninstall-lma6z9il\\pip.exe'
Consider using the `--user` option or check the permissions.
Try this command.
C:\Users\test\AppData\Local\Programs\Python\Python310\python.exe -m pip install --upgrade pip --user

PIP says it is up to date when I try to update it but then it is not

How can I fix this issue? This makes no sense, i guess i have two different python path so python gets confused how can i fix this issue as well?
C:\Users\user>pip install pip
Requirement already satisfied: pip in c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages (19.3.1)
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\user>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (20.0.2)
You have 2 different versions of Python (hence 2 different versions of pip) installed.
pip in c:\users\user\appdata\local\programs\python\python38-32
and
pip in c:\users\user\appdata\local\programs\python\python37-32
In the first example you did pip install pip but in the second python -m pip install --upgrade pip (The help text gave you a bad advice in this case).
If you want to upgrade the Python 3.8 pip, do pip install --upgrade pip or with the full path c:\users\kayra\appdata\local\programs\python\python38-32\python.exe -m pip install --upgrade pip.

Pip has 2 versions, what should I do?

So i really don't know what to do. I am confused. I am also using a virtual environment named PyCharm. There are many issues with pip there but I haven't seen anything as weird as this.
cmd output:
C:\Users\Artur\PycharmProjects\first\venv\Scripts>pip install time
Collecting time
Could not find a version that satisfies the requirement time (from versions: )
No matching distribution found for time
You are using pip version 10.0.1, however version 19.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\Artur\PycharmProjects\first\venv\Scripts>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\users\artur\pycharmprojects\first\venv\lib\site-packages (19.0.1)
C:\Users\Artur\PycharmProjects\first\venv\Scripts>pip install time
Collecting time
Could not find a version that satisfies the requirement time (from versions: )
No matching distribution found for time
You are using pip version 10.0.1, however version 19.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
To resolving your outdated pip in PyCharm by running this in your PyCharm terminal:
python -m pip install -U --force-reinstall pip
This will fix the warning you are receiving...You are using pip version 10.0.1, however version 19.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Unable to install imbalanced-learn

I am trying to install the imbalanced-learn package in Python3 with the following command: pip install - U imbalanced-learn. I get this error:
Could not find a version that satisfies the requirement imbalanced-learn (from versions: )
No matching distribution found for imbalanced-learn
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
However, when I try upgrading using python -m pip install --upgrade pip I get this:
Requirement already up-to-date: pip in c:\programdata\anaconda3\lib\site-packages (10.0.1)
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Can anyone tell me what's going on?
I had also struggled with installing it but it worked for me with:
conda install imbalanced-learn
Trying doing a pip install in your conda environment with pip install imbalanced-learn. If that doesn't work then I'll recommend you revert back to v0.3 with conda install -c glemaitre imbalanced-learn

pip install --upgrade pip installs the same version

Somehow pip --upgrade doesn't upgrade any packages.
I'm on OSX El Capitan (10.11.3) and installed python using brew install python
Python: /usr/local/bin/python# -> ../Cellar/python/2.7.11/bin/python
Pip: /usr/local/bin/pip# -> ../Cellar/python/2.7.11/bin/pip
After successful install I run pip install --upgrade pip.
Full output:
$ pip install --upgrade pip
Collecting pip
Using cached pip-8.1.0-py2.py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-8.0.2
You are using pip version 8.0.2, however version 8.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Why doesn't pip install the new version?
Update
I think it has something to do with my ~/.pydistutils.cfg file which fixes the DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both error when running pip. I followed these instructions
Related SO question
$ sudo pip install -U pip
Collecting pip
Downloading pip-9.0.3-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 335kB/s
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Successfully uninstalled pip-9.0.1
Successfully installed pip-9.0.3
Getting annoyed by things not working I created a new OSX profile. In the new profile everything was working fine so after investigating further I found a file ~/Library/Application\ Support/pip/pip.conf in my main profile containing:
[global]
target=/usr/local/lib/python2.7/site-packages
I don't know how it got there but removing it resolved the issue.
This also resolved the need for the ~/.pydistutils.cfg file.

Categories