PIP安装:无法结合--user和--target [英] PIP Install: Cannot combine --user and --target
问题描述
我的目标是将程序包安装到计算机上的特定目录,以便可以将其打包以与AWS Lambda一起使用.
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.
这是我尝试过的: pip install雪花连接器-python -t.
pip install --system --target = C:\ Users \ path2folder --install-option =-install-scripts = C:\ Users \ path2folder --upgrade Snow-connector-python
这两个选项都返回了以下错误消息:错误:无法组合'--user'和'--target'
Both of these options have returned the following error message:
ERROR: Can not combine '--user' and '--target'
为了使AWS Lambda函数正常工作,我需要在特定目录中安装我的依赖项才能创建用于部署的.zip文件.我已经搜索了Google和StackOverflow,但是没有看到可以解决此问题的线程.
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.
更新:在Mac上这似乎不是问题.所描述的问题在Windows 10上.
Update: This does not seem to be a problem on Mac. The issue described is on Windows 10.
推荐答案
我们在Python课程中遇到了相同的问题:如果将Python作为Microsoft应用商店中的应用安装,则会出现错误.在我们的情况下,通过直接从Python网站下载并使用安装包来重新安装Python后,该问题得以解决.
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.
这篇关于PIP安装:无法结合--user和--target的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!