Naxi
Naxi

Reputation: 2016

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

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'

Upvotes: 8

Views: 3912

Answers (3)

Andrea Laiena
Andrea Laiena

Reputation: 51

add --no-user at the end of the command and it should work

Upvotes: 5

Giacomo Lacava
Giacomo Lacava

Reputation: 1823

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.

Upvotes: 4

Yashu Ayush
Yashu Ayush

Reputation: 1

You can simply use:

C:\Users\XXX\Desktop\python-7>pip install chalice

Upvotes: 0

Related Questions