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
  • 5,154
  • 14
  • 52
  • 76

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
  • 8,234
  • 12
  • 59
  • 81
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,019
  • 2
  • 12
  • 29