PIP Install: Cannot combine --user and --target

岁酱吖の 提交于 2021-01-04 07:53:57

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!