LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 12-26-2016, 11:03 PM   #1
ptahx
LQ Newbie
 
Registered: Dec 2016
Posts: 6

Rep: Reputation: Disabled
Newbie Troubles upgrading pip


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.
 
Old 12-26-2016, 11:05 PM   #2
ptahx
LQ Newbie
 
Registered: Dec 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
This may be a double post - if so my apologies
 
Old 12-26-2016, 11:09 PM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,521

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Try
Code:
$ apt-get upgrade pip
 
Old 12-26-2016, 11:17 PM   #4
ptahx
LQ Newbie
 
Registered: Dec 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Tried output below
Quote:
E: Unable to locate package pip
Try
Code:
$ apt-get upgrade pip

-------------------------------------

Quote:
ptahx@PtahXGamer:~$ apt-get upgrade pip
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
ptahx@PtahXGamer:~$ sudo apt-get upgrade pip
[sudo] password for ptahx:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pip
ptahx@PtahXGamer:~$

Last edited by ptahx; 12-26-2016 at 11:20 PM.
 
Old 12-27-2016, 12:08 AM   #5
ptahx
LQ Newbie
 
Registered: Dec 2016
Posts: 6

Original Poster
Rep: Reputation: Disabled
Solved (Sort of)

Ok I'm still attempting to figure this one out,

I have since removed the directory
Quote:
rm -rf ~/anaconda.
used apt to install pip & pip3
Quote:
sudo apt install python3-pip
then reinstalled anaconda (added to path as well) interestingly enough it now made a separate directory called /home/conda instead of /home/anaconda

Quote:
bash Anaconda3-4.2.0-Linux-x86_64.sh

result still hasn't corrected the permissions issue, it still won't update tot he 9.0.1 as listed below. Thank you for your help - back to my fuddling


Quote:
ptahx@PtahXGamer:~$ sudo python3 -m pip install pip
The directory '/home/ptahx/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ptahx/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied (use --upgrade to upgrade): pip in /usr/lib/python3/dist-packages
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.
ptahx@PtahXGamer:~$ python3 -m pip install pip
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Successfully installed pip-8.1.2
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.
ptahx@PtahXGamer:~$ pip install --upgrade pip
bash: /usr/bin/pip: No such file or directory
ptahx@PtahXGamer:~$ sudo pip install --upgrade pip
sudo: pip: command not found
ptahx@PtahXGamer:~$ apt-get install --upgrade pip
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
ptahx@PtahXGamer:~$ sudo apt-get install --upgrade pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package pip
ptahx@PtahXGamer:~$

Last edited by ptahx; 12-27-2016 at 12:13 AM.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hello, Bon Jour, Pip Pip SocaSpice LinuxQuestions.org Member Intro 3 11-14-2010 08:22 AM
Newbie having troubles with GRUB eric_freeman58 Linux - Newbie 4 07-17-2004 06:08 PM
upgrading NVIDIA driver...troubles! lord_clarence Mandriva 10 10-29-2003 06:45 AM
Newbie in troubles CleonII Linux - General 3 05-15-2003 07:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration