0

How can I specify a location where I can install new package

when I hit

sudo pip install virtualenv

it installs it in

/Library/Frameworks/Python.framework/Versions/2.7/bin

I wanted to the path to be in

PATH="/usr/local/bin:$PATH"
user3378649
  • 4,674
  • 11
  • 50
  • 74

2 Answers2

1

Use this,

pip install --target=d:\somewhere\other\than\the\default package_name

In your case it will be like ,

pip install --target=/usr/local/bin package_name
Nishant Nawarkhede
  • 7,757
  • 11
  • 56
  • 79
0

See here: Install a Python package into a different directory using pip?

pip install --install-option="--prefix=$PREFIX_PATH" package_name

Or, another option:

pip install package_name -t /usr/local/bin
Community
  • 1
  • 1
datasci
  • 1,009
  • 2
  • 11
  • 29