Python: Install Dependencies into directory

2019-09-06 02:04发布

问题:

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

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.

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

Thanks for help :)

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

回答1:

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