Python:将依赖项安装到目录中 [英] Python: Install Dependencies into directory

查看:384
本文介绍了Python:将依赖项安装到目录中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个想要在Amazon AWS Lambda中工作的Python项目.因此,我需要创建一个部署程序包.我按照此页面上的说明进行了尝试:

I have a Python project that I want to get worked in Amazon aws Lambda. So i need to creat a deployment package. I tried it like explained on this page:

http: //docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html

但是这里是我的问题: 我可以安装某些依赖项,有些不能安装. 如果我要将请求安装到目录中,则会安装.如果我想将json安装到目录中,则会收到以下错误消息:无法安装目录'/Users/iTom/Desktop/project-dir'.找不到文件"setup.py".

But here my problem: Some Dependencies I can install, some are not installable. If I want to install requests into a directory, It installs. If I want to install json into a directory I get the following error massage: Directory '/Users/iTom/Desktop/project-dir' is not installable. File 'setup.py' not found.

不知道这是否重要:我还尝试安装json,但普遍出现此错误:找不到满足json要求的版本(来自版本:) 找不到与JSON匹配的分布

Dont know if this is important: I tried also to install json in general an got this error: Could not find a version that satisfies the requirement json (from versions: ) No matching distribution found for json

感谢您的帮助:)

我被告知已经包含json.编解码器和urllib是什么?

I got told json already included. What is with codecs and urllib?

推荐答案

json是python附带的内置软件包,您无需安装它.请参阅python参考 https://docs.python.org/2/library/json. html

json is a built-in package already shipped with python, you need not install it. Please see the python reference https://docs.python.org/2/library/json.html

这篇关于Python:将依赖项安装到目录中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆