pip not updating to newest version - pip

When I run pip install -U pip it doesn't install the newer version.
drahcir#Altair:~/dev$ pip --version
pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)
drahcir#Altair:~/dev$ pip install -U pip
Downloading/unpacking pip
Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB): 1.2MB downloaded
Installing collected packages: pip
Successfully installed pip
Cleaning up...
drahcir#Altair:~/dev$ pip --version
pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)
Even though it says it downloaded pip 8.1.2, the pip version still says 1.5.6
How can I get pip to upgrade to 8.1.2?

Related

"Uninstalling pip-19.0.1:" hangs

I tried to do pip install --upgrade pip in my Mac, but it hanged at Uninstalling pip-19.0.1:.
Could anyone tell me what I should do?
Ties-MBP:10studio-4 chengtie$ pip install --upgrade pip
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting pip
Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 1.1MB/s
Installing collected packages: pip
Found existing installation: pip 19.0.1
Uninstalling pip-19.0.1:
You should do it with an administrator account. Try "sudo pip install --upgrade pip".

Why I can't pip install nltk on mac os?

I'm using mac os mojave, install python 2.7 and install pip using python get-pip.py, I already try those command to install pip :
pip install --upgrade pip
pip install nltk
and try
sudo python -m pip install --upgrade nltk
But also result to same error like in this image
Or here in text:
error in nltk setup command: 'install_requires' must be a string or
list of strings containing valid project/version requirement
specifiers; Expected version spec in singledispatch; python_version <
"3.4" at ; python_version < "3.4"
Is it because my python version (2.7) ? But in pip ntlk page it says also support 2.7
update:
pip install nltk success after running :
pip install --upgrade setuptools pip --user
Start with upgrading installation tools:
pip install --upgrade setuptools pip

How do you upgrade version of pip on Repl.it?

I'm having issues upgrading pip using the pip3 install --upgrade pip3 command on Repl.it and getting this error:
Repl.it: Installing fresh packages
Usage: pip3 [options]
pip3: error: no such option: --upgrade
You are using pip version 9.0.1, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Repl.it: package installation failed!
How can I upgrade pip on Repl.it?

Install jmespth-term in Mac OSx

I am unable to install jmespath-term
It gives me :
>> sudo pip install jmespath-term
Collecting jmespath-term
Could not find any downloads that satisfy the requirement jmespath-term
No distributions at all found for jmespath-term
Python Version
python --version
Python 2.7.5
Pip Version
pip --version
pip 6.0.3 from /Library/Python/2.7/site-packages/pip-6.0.3-py2.7.egg (python 2.7)
jmespath-term appears to have an alternate name in the pypi index:
Doing a search with pip (pip search jmespath-term) returns:
jmespath-terminal - JMESPath Terminal
So pip install jmespath-terminal should work for you.

latest version of psycopg2 on aws

I am trying to get the latest version of psycopg2 on my aws instance. I noticed that the latest version was 2.4.6 but I could only get 2.0.14 on aws. Is there a way to get the latest version? There are some features I need that are not supported in the earlier versions.
This works for me in Amazon aws-cli/1.9.11 Python/2.7.10 Linux/4.1.10 and Ubuntu 14
If pip not installed in your Amazon AWS machine type:
$ sudo yum install python-pip
and then type below commands:
$ sudo yum update
$ sudo yum install libpq-dev python-dev
$ sudo pip install psycopg2
Then you will get message like below :
You are using pip version 6.1.1, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting psycopg2
Downloading psycopg2-2.6.1.tar.gz (371kB)
100% |████████████████████████████████| 372kB 1.3MB/s
Installing collected packages: psycopg2
Running setup.py install for psycopg2
Successfully installed psycopg2-2.6.1
If pip not installed in your Ubuntu machine type:
$ sudo apt-get install python-pip
and then type below commands:
$ sudo apt-get update
$ sudo apt-get install libpq-dev python-dev
$ sudo pip install psycopg2
Then you will get message like below :
You are using pip version 6.1.1, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting psycopg2
Downloading psycopg2-2.6.1.tar.gz (371kB)
100% |████████████████████████████████| 372kB 1.3MB/s
Installing collected packages: psycopg2
Running setup.py install for psycopg2
Successfully installed psycopg2-2.6.1
If you need a more recent version of psycopg2 on your EC2 instance, you can install it directly with pip using: $ pip install psycopg2
You may need to first install the python-dev and libpq-dev libraries as explained in this StackOverflow question.
Working answer as of November 2022:
sudo yum install postgresql-devel python3-devel
pip install wheel
pip install psycopg2
If you are still using Python 2 then use python-devel instead of python3-devel.
The pip install wheel is not strictly necessary, but psycopg2 prefers it and it wasn't installed yet in my environment.

Resources