[英]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.