WebFaction
Community site: login faq

My pip3.5 works well -- I have to enter pip3.5 to install packages which is other question I have -- but no complaints. When I run pip3.5 I always get prompted:

You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I enter:

pip3.5 install --upgrade pip

Response:

Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/shutil.py", line 538, in move
    os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/usr/local/bin/pip3.5' -> '/tmp/pip-wedidjsl-uninstall/usr/local/bin/pip3.5'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.5/site-packages/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python3.5/site-packages/pip/req/req_set.py", line 726, in install
    requirement.uninstall(auto_confirm=True)
  File "/usr/local/lib/python3.5/site-packages/pip/req/req_install.py", line 746, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/usr/local/lib/python3.5/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/usr/local/lib/python3.5/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/usr/local/lib/python3.5/shutil.py", line 553, in move
    os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/usr/local/bin/pip3.5'

Is this a serious problem? I don't care if "pip3.5" seems to always work for me. But a bit worried. I searched for this question and searched docs but still have no idea. Thanks! ~chris9 / Chris Komaroff

asked 25 Aug, 05:32

chris9's gravatar image

chris9
112
accept rate: 0%


You'll need to pass the --user option too. See our related documentation page.

So, the correct command is pip3.5 install --user --upgrade pip.

permanent link

answered 25 Aug, 06:49

iliasr's gravatar image

iliasr ♦♦
1.7k4
accept rate: 37%

Thank you. Adding --user avoids the error message. My current pip is 9.0.1

I am concerned that a few days ago I did not use --user when installing Django packages such as django-allauth:

pip3.5 install -U django-allauth==0.32.0

My django allauth seems to work fine, but now am concerned, not sure if installed correctly.

All my packages are here:

$HOME/lib/python3.5

Not here:

$HOME/.local

$HOME/.local = site.BASE_USER (https://pip.pypa.io/en/stable/user_guide/)

If you see a problem please tell me. Thanks, Ilias!

(27 Aug, 02:22) chris9 chris9's gravatar image

oops I meant: $HOME/.local = site.USER_BASE (https://pip.pypa.io/en/stable/user_guide/)

(27 Aug, 02:28) chris9 chris9's gravatar image

You can check the path using Django Debug toolbar or other standard debugging methods such as print(module) to check the python path being used by the server. There are typically many paths defined in the wsgi configuration in httpd.conf, it will work in any of them. If you want to maintain version picking which packages go where is something you have to decide as the developer.

(27 Aug, 03:36) johns ♦♦ johns's gravatar image

Yes, I will start using --user with all my pip installs in future. Right now I guess everything works the way I installed it. Thanks.

(27 Aug, 22:51) chris9 chris9's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×50
×37

question asked: 25 Aug, 05:32

question was seen: 1,700 times

last updated: 27 Aug, 22:51

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2017 PARAGON INTERNET GROUP LIMITED
WEBFACTION IS A SERVICE OF PARAGON INTERNET GROUP LIMITED
REGISTERED IN ENGLAND AND WALES 7573953 - VAT REGISTRATION NUMBER 182147021
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM