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

Open
asmodehn opened this issue Dec 6, 2016 · 3 comments
Labels
Milestone

Comments

@asmodehn
Copy link
Member

asmodehn commented Dec 6, 2016

Description:

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):
  Exception:

  Traceback (most recent call last):

    File "/home/alexv/ROS/gopher_bootstrap/build/catkin_pip_env/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
      status = self.run(options, args)
    File "/home/alexv/ROS/gopher_bootstrap/build/catkin_pip_env/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
      prefix=options.prefix_path,
    File "/home/alexv/ROS/gopher_bootstrap/build/catkin_pip_env/lib/python2.7/site-packages/pip/req/req_set.py", line 778, in install
      requirement.uninstall(auto_confirm=True)
    File "/home/alexv/ROS/gopher_bootstrap/build/catkin_pip_env/lib/python2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
      paths_to_remove.remove(auto_confirm)
    File "/home/alexv/ROS/gopher_bootstrap/build/catkin_pip_env/lib/python2.7/site-packages/pip/req/req_uninstall.py", 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/__init__.py", line 267, in renames
      shutil.move(old, new)
    File "/usr/lib/python2.7/shutil.py", line 300, in move
      rmtree(src)
    File "/usr/lib/python2.7/shutil.py", line 252, in rmtree
      onerror(os.remove, fullname, sys.exc_info())
    File "/usr/lib/python2.7/shutil.py", line 250, in rmtree
      os.remove(fullname)

  OSError: [Errno 13] Permission denied:
  '/opt/yujin/amd64/indigo-devel/lib/python2.7/dist-packages/pyros-0.3.0-py2.7.egg-info/entry_points.txt'

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

@asmodehn
Copy link
Member Author

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

@asmodehn
Copy link
Member Author

#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)

@asmodehn
Copy link
Member Author

WIP here : #122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant