Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pip install on windows is giving can not combine '--user' and '--target'

Tags:

pip

I am trying to run below commands but it's not working on my windows machine.

C:\Users\XXX\Desktop\python-7>pip install chalice -t .
ERROR: Can not combine '--user' and '--target'

C:\Users\XXX\Desktop\python-7>pip install --user --install-option="--prefix=" chalice -t .
ERROR: Can not combine '--user' and '--target'

Can someone please let me know if there is any alternative to get the module in the same directory ?

UPDATE

C:\Users\XXX\Desktop\python-7>pip install --target=C:\Users\XXX\Desktop\python-7 chalice
ERROR: Can not combine '--user' and '--target'
like image 998
Naxi Avatar asked May 27 '20 08:05

Naxi


1 Answers

This happens with the Python version distributed on the Windows AppStore.

I believe it's because that version installs the basic executables under C:\Program Files\WindowsApps, a secured location that users cannot modify; pip is then aliased to actually run as something like pip --user C:\Users\<your_user>\AppData\Local\Packages\PythonSoftwareFoundation.Python.<version>_<id>\LocalCache\local-packages\Python<version>, so users will install packages to a writeable folder.

Hence, as soon as you try to add --target, pip breaks.

like image 175
Giacomo Lacava Avatar answered Oct 23 '22 14:10

Giacomo Lacava