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

Python pip install with --target option doesn't work #837

Closed
chhantyal opened this issue Aug 30, 2016 · 4 comments
Closed

Python pip install with --target option doesn't work #837

chhantyal opened this issue Aug 30, 2016 · 4 comments
Assignees
Labels
python Homebrew/brew's python support

Comments

@chhantyal
Copy link
Contributor

Bug reports:

pip has nice option to specify where a package should be installed.

pip install requests --target python_packages/

With Homebrew installed Python and pip, this doesn't work anymore.

 pip install requests -t python_packages/
Collecting requests
  Using cached requests-2.11.1-py2.py3-none-any.whl
Installing collected packages: requests
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 742, in install
    **kwargs
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 831, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 1032, in move_wheel_files
    isolated=self.isolated,
  File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 247, in move_wheel_files
    prefix=prefix,
  File "/usr/local/lib/python2.7/site-packages/pip/locations.py", line 153, in distutils_scheme
    i.finalize_options()
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 264, in finalize_options
    "must supply either home or prefix/exec-prefix -- not both"
DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both

Issue with --user option is mentioned in docs (though it's not corret, see #821 ), but not --target.

@MikeMcQuaid MikeMcQuaid added the python Homebrew/brew's python support label Aug 30, 2016
@MikeMcQuaid
Copy link
Member

CC @tdsmith for thoughts.

@tdsmith
Copy link
Contributor

tdsmith commented Aug 30, 2016

cf #821

@tdsmith tdsmith self-assigned this Sep 2, 2016
@MikeMcQuaid
Copy link
Member

Closing this and #821 but @tdsmith feel free to reopen.

@Homebrew Homebrew locked and limited conversation to collaborators Jan 26, 2017
@tdsmith
Copy link
Contributor

tdsmith commented Jan 26, 2017

pyenv is good!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
python Homebrew/brew's python support
Projects
None yet
Development

No branches or pull requests

3 participants