简体   繁体   English

aws-lambda-python教程指的是'virtualenv'和'source'

[英]aws-lambda - python tutorial refers to 'virtualenv' and 'source'

I am trying to follow the aws-lambda tutorial at 我正在尝试遵循aws-lambda教程,网址为

Sample Amazon S3 Function Code - AWS Lambda 示例Amazon S3功能代码-AWS Lambda

It contains lines: 它包含以下几行:

...
    1 Create a virtual environment.
    $ virtualenv ~/shrink_venv
    $ source ~/shrink_venv/bin/activate

2 Install libraries in the virtual environment
    $ pip install Pillow
    $ pip install boto3

3 Add the contents of lib and lib64 site-packages to your .zip file.
    $ cd $VIRTUAL_ENV/lib/python3.7/site-packages
    $ zip -r ~/CreateThumbnail.zip .
    ...

These all appear to be done on the command line. 这些似乎都是在命令行上完成的。 How does one get these utilities and find the documentation for them? 如何获得这些实用程序并找到它们的文档?

I am on Windows 10 running on the command line with Anaconda. 我在Windows 10上使用Anaconda在命令行上运行。

I've also looked in cygwin. 我也看过cygwin。

I ran these commands in Windows 10 create a virtual environment with python 3 我在Windows 10中运行了这些命令,并使用python 3创建了一个虚拟环境

pip3 install virtualenv
python -m virtualenv path\to\location\virtualenv-name
cd path\to\location\virtualenv-name
.\Scripts\activate

pip3 install virtualenv #Install virtualenv module for python3 pip3 install virtualenv为python3 pip3 install virtualenv模块

python -m virtualenv path\\to\\location\\virtualenv-name #Creates the virtual environment in the given path. python -m virtualenv path\\to\\location\\virtualenv-name #在给定路径中创建虚拟环境。 For example E:\\test\\testing, E:\\test is the path and testing is the virtual environment name, 例如E:\\ test \\ testing,E:\\ test是路径,而test是虚拟环境名称,

Check this question for the command line equivalent of source command - Batch equivalent of "source" on Windows: how to run a Python script from a virtualenv 检查此问题以获取与源命令等效的命令行-Windows上与“源”等效的批处理:如何从virtualenv运行Python脚本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 aws-lambda教程因botocore.exceptions.ClientError而失败:禁止 - aws-lambda tutorial fails with botocore.exceptions.ClientError: Forbidden AWS-Lambda:如何在 python 中处理 SNS 事件 - AWS-Lambda: How to deal with SNS event in python 使用 Exec 或 Eval 在 AWS-LAMBDA 中运行不受信任的 Python 代码 - Running Untrusted Python Code in AWS-LAMBDA using Exec or Eval 如何为 aws-lambda python API 生成 swagger 文档? - How to generate swagger documentation for aws-lambda python API? pycripto和AWS-Lambda错误 - Error with pycripto and AWS-Lambda 带有Python 3和virtualenv的AWS Lambda无法安装依赖项 - AWS Lambda with Python 3 and virtualenv failed to install dependencies Python aws-lambda返回xml文件到aws-api-gateway - Python aws-lambda return xml file to aws-api-gateway aws-lambda 函数中的异常处理 - Exception handling in aws-lambda functions OSError:[Errno 2]没有这样的文件或目录:php shell_exec [AWS-Lambda]内部的[python脚本] - OSError: [Errno 2] No such file or directory : [python script] inside php shell_exec [ AWS-Lambda] 在 AWS-Lambda(Python) 中,我如何调用需要在 header 中进行令牌授权的外部 API - In AWS-Lambda(Python), how can I Invoke External API which needs Token Authorization in the header
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM