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

pip install -t tries to remove same package systemwide if found #1818

Closed
marianoguerra opened this issue May 12, 2014 · 9 comments
Closed

pip install -t tries to remove same package systemwide if found #1818

marianoguerra opened this issue May 12, 2014 · 9 comments
Labels
auto-locked Outdated issues that have been locked by automation C: target pip install's --target option's behaviour handling type: bug A confirmed bug or unintended behavior

Comments

@marianoguerra
Copy link

hi, running

pip install -t dir jinja2

after running

sudo pip install jinja2

will try to remove the systemwide install and fail because it has no permissions.

it seems to me to be a bug, why would I have the option to install a lib in a directory I choose if it will look for the package somewhere else and try to uninstall it?

the documentation about the option doesn't tell a lot:

https://pip.pypa.io/en/latest/reference/pip_install.html#cmdoption-t

and from pip help install:

-t, --target <dir>          Install packages into <dir>.

version info:

➜  ~  python --version
Python 2.7.5
➜  ~  pip --version
pip 1.4.1 from /usr/lib/python2.7/site-packages (python 2.7)

full output below

➜  tmp  mkdir deps
➜  tmp  sudo pip install jinja2
Downloading/unpacking jinja2
  Downloading Jinja2-2.7.2.tar.gz (378kB): 378kB downloaded
  Running setup.py egg_info for package jinja2

    warning: no files found matching '*' under directory 'custom_fixers'
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
Requirement already satisfied (use --upgrade to upgrade): markupsafe in /usr/lib64/python2.7/site-packages (from jinja2)
Installing collected packages: jinja2
  Running setup.py install for jinja2

    warning: no files found matching '*' under directory 'custom_fixers'
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
Successfully installed jinja2
Cleaning up...
➜  tmp  pip install -I --target deps jinja2
Downloading/unpacking jinja2
  Downloading Jinja2-2.7.2.tar.gz (378kB): 378kB downloaded
  Running setup.py egg_info for package jinja2

    warning: no files found matching '*' under directory 'custom_fixers'
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
Downloading/unpacking markupsafe (from jinja2)
  Downloading MarkupSafe-0.23.tar.gz
  Running setup.py egg_info for package markupsafe

Installing collected packages: jinja2, markupsafe
  Found existing installation: Jinja2 2.7.2
    Uninstalling Jinja2:
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 134, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 241, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/lib/python2.7/site-packages/pip/req.py", line 1294, in install
    requirement.uninstall(auto_confirm=True)
  File "/usr/lib/python2.7/site-packages/pip/req.py", line 525, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/usr/lib/python2.7/site-packages/pip/req.py", line 1639, in remove
    renames(path, new_path)
  File "/usr/lib/python2.7/site-packages/pip/util.py", line 294, in renames
    shutil.move(old, new)
  File "/usr/lib64/python2.7/shutil.py", line 299, in move
    rmtree(src)
  File "/usr/lib64/python2.7/shutil.py", line 252, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "/usr/lib64/python2.7/shutil.py", line 250, in rmtree
    os.remove(fullname)
OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/Jinja2-2.7.2-py2.7.egg-info/not-zip-safe'

Storing complete log in /home/mariano/.pip/pip.log

pip.log

------------------------------------------------------------
/usr/bin/pip run on Mon May 12 22:57:18 2014
Downloading/unpacking jinja2

  Getting page https://pypi.python.org/simple/jinja2/
  URLs to search for versions for jinja2:
  * https://pypi.python.org/simple/jinja2/
  Analyzing links from page https://pypi.python.org/simple/Jinja2/
    Skipping link https://pypi.python.org/packages/2.4/J/Jinja2/Jinja2-2.0rc1-py2.4-linux-i686.egg#md5=e4286023eed2f6d8cc5f5075106db1f4 (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.4/J/Jinja2/Jinja2-2.0rc1-py2.4-linux-x86_64.egg#md5=3f0499f5f0caa7943d4ba3cb20740f5e (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.4/J/Jinja2/Jinja2-2.0rc1-py2.4-macosx-10.3-i386.egg#md5=3b5901001e84aa62c8bc4c6f0a638b18 (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.4/J/Jinja2/Jinja2-2.0rc1-py2.4-win32.egg#md5=6f17c620d4bc9272f3061b70ab7af11b (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.4/J/Jinja2/Jinja2-2.1-py2.4-win32.egg#md5=d8eb08f4ef61b05a00039a48f620deeb (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.4/J/Jinja2/Jinja2-2.1.1-py2.4-win32.egg#md5=ce0a82883624cd31c8b513b7bc961148 (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.5/J/Jinja2/Jinja2-2.0rc1-py2.5-linux-i686.egg#md5=3a2be0c13c6036d59e81f9b3db82bdfa (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.5/J/Jinja2/Jinja2-2.0rc1-py2.5-linux-x86_64.egg#md5=3ccf95d2d6245b5407cdda0577b24f64 (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.5/J/Jinja2/Jinja2-2.0rc1-py2.5-macosx-10.3-i386.egg#md5=bc82f2a2e9b55ca1472bc7b89fedca06 (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.5/J/Jinja2/Jinja2-2.0rc1-py2.5-win32.egg#md5=40af7fdc93abd3892b6ea2f208a6033b (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.5/J/Jinja2/Jinja2-2.1-py2.5-win32.egg#md5=135dad62ce5de34a54d568a2b3cd05f0 (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.5/J/Jinja2/Jinja2-2.1.1-py2.5-win32.egg#md5=a6cd9757966640a7bb7e887c24dd9ff3 (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.6/J/Jinja2/Jinja2-2.1-py2.6-win32.egg#md5=8319235be842d5a61c552be8d206f65a (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Skipping link https://pypi.python.org/packages/2.6/J/Jinja2/Jinja2-2.1.1-py2.6-win32.egg#md5=8540a2bf5bfd263842d3a7c6df13977b (from https://pypi.python.org/simple/Jinja2/); unknown archive format: .egg
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.0.tar.gz#md5=19fe3ee10ee94a6003c53374112f2403 (from https://pypi.python.org/simple/Jinja2/), version: 2.0
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.0rc1.tar.gz#md5=7751e097f23fec244634e601d86e1d60 (from https://pypi.python.org/simple/Jinja2/), version: 2.0rc1
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.1.1.tar.gz#md5=b37fc262e4f613eec57c3defe6aea97c (from https://pypi.python.org/simple/Jinja2/), version: 2.1.1
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.1.tar.gz#md5=c7a31931c95a7ae5e1baf21074fdd576 (from https://pypi.python.org/simple/Jinja2/), version: 2.1
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.2.1.tar.gz#md5=fea849d68891218eb0b21c170f1c32d5 (from https://pypi.python.org/simple/Jinja2/), version: 2.2.1
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.2.tar.gz#md5=7ea7821801eee5def026c216d80e5103 (from https://pypi.python.org/simple/Jinja2/), version: 2.2
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.3.1.tar.gz#md5=391c7dd06c62dfe7e30ebaad7af0a401 (from https://pypi.python.org/simple/Jinja2/), version: 2.3.1
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.3.tar.gz#md5=7fc34b115f157474d988db8caab6895c (from https://pypi.python.org/simple/Jinja2/), version: 2.3
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.4.1.tar.gz#md5=e0cf5af057fac63ac9689b86c8b31ce6 (from https://pypi.python.org/simple/Jinja2/), version: 2.4.1
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.4.tar.gz#md5=635746009a6560e20db97e94db28867d (from https://pypi.python.org/simple/Jinja2/), version: 2.4
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.5.1.tar.gz#md5=12be091a5d2edae961b65adfc99da826 (from https://pypi.python.org/simple/Jinja2/), version: 2.5.1
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.5.2.tar.gz#md5=3829be2926a067ee024e6d3e5327dbf7 (from https://pypi.python.org/simple/Jinja2/), version: 2.5.2
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.5.3.tar.gz#md5=cae31ce405ec5e4f167913b25ee4f65a (from https://pypi.python.org/simple/Jinja2/), version: 2.5.3
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.5.4.tar.gz#md5=4553d5aef15d550bfebbc1903014067e (from https://pypi.python.org/simple/Jinja2/), version: 2.5.4
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.5.5.tar.gz#md5=83b20c1eeb31f49d8e6392efae91b7d5 (from https://pypi.python.org/simple/Jinja2/), version: 2.5.5
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.5.tar.gz#md5=d02f82e33afe918cef8a9abcd23ccd78 (from https://pypi.python.org/simple/Jinja2/), version: 2.5
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.6.tar.gz#md5=1c49a8825c993bfdcf55bb36897d28a2 (from https://pypi.python.org/simple/Jinja2/), version: 2.6
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.1.tar.gz#md5=282aed153e69f970d6e76f78ed9d027a (from https://pypi.python.org/simple/Jinja2/), version: 2.7.1
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.2.tar.gz#md5=df1581455564e97010e38bc792012aa5 (from https://pypi.python.org/simple/Jinja2/), version: 2.7.2
    Found link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.tar.gz#md5=c2fb12cbbb523c57d3d15bfe4dc0e8fe (from https://pypi.python.org/simple/Jinja2/), version: 2.7
  Ignoring link https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.0rc1.tar.gz#md5=7751e097f23fec244634e601d86e1d60 (from https://pypi.python.org/simple/Jinja2/), version 2.0rc1 is a pre-release (use --pre to allow).
  Using version 2.7.2 (newest of versions: 2.7.2, 2.7.1, 2.7, 2.6, 2.5.5, 2.5.4, 2.5.3, 2.5.2, 2.5.1, 2.5, 2.4.1, 2.4, 2.3.1, 2.3, 2.2.1, 2.2, 2.1.1, 2.1, 2.0)
  Downloading from URL https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.2.tar.gz#md5=df1581455564e97010e38bc792012aa5 (from https://pypi.python.org/simple/Jinja2/)
  Running setup.py egg_info for package jinja2

    running egg_info
    creating pip-egg-info/Jinja2.egg-info
    writing requirements to pip-egg-info/Jinja2.egg-info/requires.txt
    writing pip-egg-info/Jinja2.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/Jinja2.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/Jinja2.egg-info/dependency_links.txt
    writing entry points to pip-egg-info/Jinja2.egg-info/entry_points.txt
    writing manifest file 'pip-egg-info/Jinja2.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found


    reading manifest file 'pip-egg-info/Jinja2.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*' under directory 'custom_fixers'

    warning: no previously-included files matching '*' found under directory 'docs/_build'

    warning: no previously-included files matching '*.pyc' found under directory 'jinja2'

    warning: no previously-included files matching '*.pyc' found under directory 'docs'

    warning: no previously-included files matching '*.pyo' found under directory 'jinja2'

    warning: no previously-included files matching '*.pyo' found under directory 'docs'

    writing manifest file 'pip-egg-info/Jinja2.egg-info/SOURCES.txt'
  Source in /tmp/pip_build_mariano/jinja2 has version 2.7.2, which satisfies requirement jinja2
  skipping extra i18n
Downloading/unpacking markupsafe (from jinja2)

  Getting page https://pypi.python.org/simple/markupsafe/
  URLs to search for versions for markupsafe (from jinja2):
  * https://pypi.python.org/simple/markupsafe/
  Analyzing links from page https://pypi.python.org/simple/MarkupSafe/
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.11.tar.gz#md5=48d445941c16d6aa55caf8e148fc0911 (from https://pypi.python.org/simple/MarkupSafe/), version: 0.11
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.12.tar.gz#md5=edd4b6950f6d4ddc6e23fa322f8f0f53 (from https://pypi.python.org/simple/MarkupSafe/), version: 0.12
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.13.tar.gz#md5=f44b8f4bba98b3e66884158f97585829 (from https://pypi.python.org/simple/MarkupSafe/), version: 0.13
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.14.tar.gz#md5=68c6ea6df002649218d24cf490a8ca82 (from https://pypi.python.org/simple/MarkupSafe/), version: 0.14
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.15.tar.gz#md5=4e7c4d965fe5e033fa2d7bb7746bb186 (from https://pypi.python.org/simple/MarkupSafe/), version: 0.15
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.16.tar.gz#md5=fe88012f7fe75252efd26cd25a100851 (from https://pypi.python.org/simple/MarkupSafe/), version: 0.16
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.17.tar.gz#md5=61d5edc130e3242cfaff9fd9fdefde8f (from https://pypi.python.org/simple/MarkupSafe/), version: 0.17
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.18.tar.gz#md5=f8d252fd05371e51dec2fe9a36890687 (from https://pypi.python.org/simple/MarkupSafe/), version: 0.18
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.19.tar.gz#md5=ccb3f746c807c5500850987006854a6d (from https://pypi.python.org/simple/MarkupSafe/), version: 0.19
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.20.tar.gz#md5=7da066d9cb191a70aa85d0a3d43565d1 (from https://pypi.python.org/simple/MarkupSafe/), version: 0.20
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.21.tar.gz#md5=fde838d9337fa51744283f46a1db2e74 (from https://pypi.python.org/simple/MarkupSafe/), version: 0.21
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.22.tar.gz#md5=cb3ec29fd5361add24cfd0c6e2953b3e (from https://pypi.python.org/simple/MarkupSafe/), version: 0.22
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz#md5=f5ab3deee4c37cd6a922fb81e730da6e (from https://pypi.python.org/simple/MarkupSafe/), version: 0.23
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.9.1.tar.gz#md5=7f469f664b565b440f099997255e6d3c (from https://pypi.python.org/simple/MarkupSafe/), version: 0.9.1
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.9.2.tar.gz#md5=69b72d1afdd9e808f9c1ef65f819c7a6 (from https://pypi.python.org/simple/MarkupSafe/), version: 0.9.2
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.9.3.tar.gz#md5=99dccbeb83302f6b593d382098b3b43a (from https://pypi.python.org/simple/MarkupSafe/), version: 0.9.3
    Found link https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.9.tar.gz#md5=10a7c6bf81f91f280ba9e76e32e01c94 (from https://pypi.python.org/simple/MarkupSafe/), version: 0.9
  Using version 0.23 (newest of versions: 0.23, 0.22, 0.21, 0.20, 0.19, 0.18, 0.17, 0.16, 0.15, 0.14, 0.13, 0.12, 0.11, 0.9.3, 0.9.2, 0.9.1, 0.9)
  Downloading MarkupSafe-0.23.tar.gz

  Downloading from URL https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz#md5=f5ab3deee4c37cd6a922fb81e730da6e (from https://pypi.python.org/simple/MarkupSafe/)
  Running setup.py egg_info for package markupsafe

    running egg_info
    creating pip-egg-info/MarkupSafe.egg-info
    writing pip-egg-info/MarkupSafe.egg-info/PKG-INFO
    writing top-level names to pip-egg-info/MarkupSafe.egg-info/top_level.txt
    writing dependency_links to pip-egg-info/MarkupSafe.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/MarkupSafe.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found


    reading manifest file 'pip-egg-info/MarkupSafe.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'pip-egg-info/MarkupSafe.egg-info/SOURCES.txt'
  Source in /tmp/pip_build_mariano/markupsafe has version 0.23, which satisfies requirement markupsafe (from jinja2)
Installing collected packages: jinja2, markupsafe

  Found existing installation: Jinja2 2.7.2

    Uninstalling Jinja2:

      Removing file or directory /usr/lib/python2.7/site-packages/Jinja2-2.7.2-py2.7.egg-info
Cleaning up...

  Removing temporary dir /tmp/pip_build_mariano...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 134, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 241, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/lib/python2.7/site-packages/pip/req.py", line 1294, in install
    requirement.uninstall(auto_confirm=True)
  File "/usr/lib/python2.7/site-packages/pip/req.py", line 525, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/usr/lib/python2.7/site-packages/pip/req.py", line 1639, in remove
    renames(path, new_path)
  File "/usr/lib/python2.7/site-packages/pip/util.py", line 294, in renames
    shutil.move(old, new)
  File "/usr/lib64/python2.7/shutil.py", line 299, in move
    rmtree(src)
  File "/usr/lib64/python2.7/shutil.py", line 252, in rmtree
    onerror(os.remove, fullname, sys.exc_info())
  File "/usr/lib64/python2.7/shutil.py", line 250, in rmtree
    os.remove(fullname)
OSError: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/Jinja2-2.7.2-py2.7.egg-info/not-zip-safe'
@marianoguerra
Copy link
Author

comparison with tools in similar languages:

ruby:

ruby install -i . rack # installs rack in the current directory, doing it in two directories doesn't affect other installations

ruby install rack # installs latest version of the package in ~/.gems/ruby/gems
ruby install rack -v 1.5.0 # same as above, installs alongside

node:

npm install lodash # installs at ./node_modules/lodash

dart:

pub get <package>

from the docs:

This command gets all the dependencies listed in the pubspec.yaml file in the current working
directory, as well as their transitive dependencies, and places them in a packages directory
located next to the pubspec

clojure: lein resolve dependencies from a project file and installs them into a user repository at $HOME/.m2/repository it support multiple versions of the same lib along each other

scala: sbt, same as clojure, uses the same underlying repository (apache ivy) AFAIR

erlang: rebar resolves dependencies from a project file and installs them inside a deps directory inside the project

all of them support one or both of the following patterns:

  • install inside each project
  • install under a user repo that support mutliple versions of the same package

none of them require something like virtualenv since just setting the lib path loading order correctly works.

@marianoguerra
Copy link
Author

php: composer

To fetch the defined dependencies into your local project, just run the install command of composer.phar.

php composer.phar install

This will find the latest version of monolog/monolog that matches the supplied version constraint and download it into the vendor directory.

@marianoguerra
Copy link
Author

.net: nuget

...
A new folder named packages is created in your solution folder.
...
The packages folder contains a subfolder for each installed package.

this covers a lot of the package/dependency managers on other languages, all of them handle one of the 2 strategies above and given the fact that pip doesn't handle a central/per user repo with multi version support (and it will be hard to implement), allowing to install the packages inside each project without affecting the same package in other places as the other do makes sense.

note that none of the others require something like virtualenv because the package managers don't introduce the problems that virtualenv tries to solve.

@gilgamezh
Copy link

+1 👍

@marianoguerra
Copy link
Author

another reason why this is an issue, imagine I want to install jinja2 in some weird place for some reason and I use sudo so pip can do it's uninstallation, now all the apps that expect jinja to be in site-packages won't work anymore.

@jairot
Copy link

jairot commented May 13, 2014

+1

@webmaven
Copy link

Related to #1489, #1710, and #1636.

@xavfernandez
Copy link
Member

Looks like it was fixed in 1.5 :

@webmaven
Copy link

Should this bugfix be backported to a 1.4.x release as as well?

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: target pip install's --target option's behaviour handling type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

5 participants