LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Confused with pip upgrade (https://www.linuxquestions.org/questions/linux-software-2/confused-with-pip-upgrade-4175596191/)

ptahx 12-26-2016 10:55 PM

Confused with pip upgrade
 
I am running Ubuntu 16.10 with Anaconda installed and am attempting to update pip using the command line
Quote:

sudo pip install --upgrade pip
which doesn't seem to work at all .

I have also tried

Quote:

pip install --upgrade pip
(output below).

beyond that I have tried in an attempt to change the permissions on that directory.
Quote:

sudo find /home/ptahx/anaconda3 -type d -exec chmod 755 {} \;
I'm at a loss as to what to attempt next, I've tried reading up on it but haven't had much luck beyond what I have listed above. Any ideas or help would be appreciated.

Cheers!
newbie - PtahX



Quote:

ptahx@PtahXGamer:~$ pip install --upgrade pip
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 8.1.2
Uninstalling pip-8.1.2:
Exception:
Traceback (most recent call last):
File "/home/ptahx/anaconda3/lib/python3.5/shutil.py", line 538, in move
os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/home/ptahx/anaconda3/bin/pip' -> '/tmp/pip-84n_t6ee-uninstall/home/ptahx/anaconda3/bin/pip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/ptahx/anaconda3/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/ptahx/anaconda3/lib/python3.5/site-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/home/ptahx/anaconda3/lib/python3.5/site-packages/pip/req/req_set.py", line 736, in install
requirement.uninstall(auto_confirm=True)
File "/home/ptahx/anaconda3/lib/python3.5/site-packages/pip/req/req_install.py", line 742, in uninstall
paths_to_remove.remove(auto_confirm)
File "/home/ptahx/anaconda3/lib/python3.5/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/home/ptahx/anaconda3/lib/python3.5/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/home/ptahx/anaconda3/lib/python3.5/shutil.py", line 553, in move
os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/home/ptahx/anaconda3/bin/pip'
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Habitual 12-27-2016 08:23 AM

Quote:

Originally Posted by ptahx (Post 5646609)
Quote:

You should consider upgrading via the 'pip install --upgrade pip' command.

command worked here.
Code:

sudo pip install --upgrade pip
Downloading/unpacking pip from https://pypi.python.org/packages/b6/ac/7015eb97dc749283ffdec1c3a88ddb8ae03b8fad0f0e611408f196358da3/pip-9.0.1-py2.py3-none-any.whl#md5=297dbd16ef53bcef0447d245815f5144
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB): 1.3MB downloaded
Installing collected packages: pip
  Found existing installation: pip 1.5.4
    Not uninstalling pip at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed pip
Cleaning up...

Let us know.

What is meant by "doesn't seem to work"?
If you run it twice, it spews really nasty looking Warnings.
Just means "current" AFAICT.

Stop changing perms/ownership until you get this resolved is my advice.
Shouldn't have to delete nothing either.

ptahx 12-27-2016 09:05 AM

Solved :)
 
Appreciate the time from all of you! :) I will stop messing with permissions as recommended :) so running pip (without sudo) shows pip as being up to date --

in response to your questions:
#What is meant by "doesn't seem to work"?

You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command. but It is as of this mornig no longer giving me this warning for some reason. Probably you're correct in I entered the command too many times :)

below is the result - Thanks again for all your help

Quote:

ptahx@PtahXGamer:~$ sudo pip install --upgrade pip
sudo: pip: command not found

ptahx@PtahXGamer:~$ pip install --upgrade pip
Requirement already up-to-date: pip in ./.local/lib/python3.5/site-packages
ptahx@PtahXGamer:~$


************************************
Quote:

Originally Posted by Habitual (Post 5646727)
command worked here.
Code:

sudo pip install --upgrade pip
Downloading/unpacking pip from https://pypi.python.org/packages/b6/ac/7015eb97dc749283ffdec1c3a88ddb8ae03b8fad0f0e611408f196358da3/pip-9.0.1-py2.py3-none-any.whl#md5=297dbd16ef53bcef0447d245815f5144
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB): 1.3MB downloaded
Installing collected packages: pip
  Found existing installation: pip 1.5.4
    Not uninstalling pip at /usr/lib/python2.7/dist-packages, owned by OS
Successfully installed pip
Cleaning up...

Let us know.

What is meant by "doesn't seem to work"?
If you run it twice, it spews really nasty looking Warnings.
Just means "current" AFAICT.

Stop changing perms/ownership until you get this resolved is my advice.
Shouldn't have to delete nothing either.


Habitual 12-27-2016 09:50 AM

Glad it worked out!


All times are GMT -5. The time now is 07:33 AM.