问题
My goal is to install a package to a specific directory on my machine so I can package it up to be used with AWS Lambda.
Here is what I have tried:pip install snowflake-connector-python -t .
pip install --system --target=C:\Users\path2folder --install-option=--install-scripts=C:\Users\path2folder --upgrade snowflake-connector-python
Both of these options have returned the following error message:ERROR: Can not combine '--user' and '--target'
In order for the AWS Lambda function to work, I need to have my dependencies installed in a specific directory to create a .zip file for deployment. I have searched through Google and StackOverflow, but have not seen a thread that has answered this issue.
Update: This does not seem to be a problem on Mac. The issue described is on Windows 10.
回答1:
We had the same issue just in a Python course: The error comes up if Python is installed as an app from the Microsoft app store. In our case it was resolved after re-installing Python by downloading and using the installation package directly from the Python website.
来源:https://stackoverflow.com/questions/63783587/pip-install-cannot-combine-user-and-target