Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to uninstall a package from another path (not prefix) with pip > 9.0 #58

asmodehn opened this issue Dec 6, 2016 · 3 comments


Copy link

@asmodehn asmodehn commented Dec 6, 2016


Catkin pip a complex system managing python packages in prefixes via pythonpath (and not standard virtualenvs).

development packages are installed with -e --ignore-installed --prefix <prefix_path>.

Since upgrading to pip 9.0.1 (probably 9.0.0 as well) I get permissions errors(during an entry_point install), while pip is trying to uninstall an existing system package (in a different python path).

I would expect --ignore-installed to be respected as it used to.

That being said, I have so far been unable to isolate my issue in a clean environment...

All I have for now is this error message:

--     ... Running /home/alexv/ROS/gopher_bootstrap/build/catkin_pip_env/bin/pip install -e /home/alexv/ROS/gopher_bootstrap/src/pyros --ignore-installed --no-dependencies --prefix /home/alexv/ROS/gopher_bootstrap/devel ...
--     ... Done ... [2]: Obtaining file:///home/alexv/ROS/gopher_bootstrap/src/pyros
Installing collected packages: pyros
  Found existing installation: pyros 0.3.0
    Uninstalling pyros-0.3.0:

-- Command /home/alexv/ROS/gopher_bootstrap/build/catkin_pip_env/bin/pip install -e /home/alexv/ROS/gopher_bootstrap/src/pyros --ignore-installed --no-dependencies --prefix /home/alexv/ROS/gopher_bootstrap/devel FAILED !
CMake Error at /home/alexv/ROS/gopher_bootstrap/devel/share/catkin_pip/cmake/catkin-pip-runcmd.cmake:37 (message):

  Traceback (most recent call last):

    File "/home/alexv/ROS/gopher_bootstrap/build/catkin_pip_env/lib/python2.7/site-packages/pip/", line 215, in main
      status =, args)
    File "/home/alexv/ROS/gopher_bootstrap/build/catkin_pip_env/lib/python2.7/site-packages/pip/commands/", line 342, in run
    File "/home/alexv/ROS/gopher_bootstrap/build/catkin_pip_env/lib/python2.7/site-packages/pip/req/", line 778, in install
    File "/home/alexv/ROS/gopher_bootstrap/build/catkin_pip_env/lib/python2.7/site-packages/pip/req/", line 754, in uninstall
    File "/home/alexv/ROS/gopher_bootstrap/build/catkin_pip_env/lib/python2.7/site-packages/pip/req/", line 115, in remove
      renames(path, new_path)
    File "/home/alexv/ROS/gopher_bootstrap/build/catkin_pip_env/lib/python2.7/site-packages/pip/utils/", line 267, in renames
      shutil.move(old, new)
    File "/usr/lib/python2.7/", line 300, in move
    File "/usr/lib/python2.7/", line 252, in rmtree
      onerror(os.remove, fullname, sys.exc_info())
    File "/usr/lib/python2.7/", line 250, in rmtree

  OSError: [Errno 13] Permission denied:

I have for now pined pip down to 8.1.2, and the problem does not occur...


This comment has been minimized.

Copy link
Collaborator Author

@asmodehn asmodehn commented Feb 22, 2017

we might be able to work around this if #90 proves to be usable


This comment has been minimized.

Copy link
Collaborator Author

@asmodehn asmodehn commented Mar 17, 2017

#90 is not really usable...

It seems we need to move to use --target instead of --prefix, to avoid problems from pip 9.0.
Explanation there : pypa/pip#4243 (comment)


This comment has been minimized.

Copy link
Collaborator Author

@asmodehn asmodehn commented May 23, 2017

WIP here : #122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.