jeudi 13 août 2015

Installing a .whl Python package into a specific directory other than the default

I am trying to install the 64 bit version of ntlk, which comes in a .whl file, in a different directory than the standard python34/Lib folder. I am using windows 10 64 bit and python 3.4 64 bit.

I first tried using the instructions in this question (which worked for other modules):

Install a python package into a different directory using pip?

The command I typed into cmd was:

py -m pip install --install-option="--prefix=$PATH_NAME" nltk-3.0.4-py2.py3-none-any.whl

It promptly gave me the following error:

UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.

It appears that I can't install WHL files using the --install-option. Is there an alternate way I can install the .whl package in a non default directory?

Edit: I marked this as solved because the proposed solution allows me to do what I need in my own use case. However, it doesn't completely answer the question due to inherent limitations in using --root to choose an alternate directory. There is technically no correct solution to this problem, see the answer's comments for details.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire