我正在尝试学习aws-lambda教程,请访问
Sample Amazon S3 Function Code - AWS Lambda
它包含以下几行:
...
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 .
...这些似乎都是在命令行上完成的。如何获取这些实用程序并找到它们的文档?
我在Windows10上运行Anaconda命令行。
我也在cygwin上看过。
发布于 2019-09-13 12:49:54
我在Windows 10中运行了这些命令,使用python 3创建虚拟环境
pip3 install virtualenv
python -m virtualenv path\to\location\virtualenv-name
cd path\to\location\virtualenv-name
.\Scripts\activatepip3 install virtualenv #为python3安装virtualenv模块
python -m virtualenv path\to\location\virtualenv-name #在给定路径下创建虚拟环境。例如,E:\test\ testing,E:\test是路径,testing是虚拟环境名称,
查看此问题中与源命令等效的命令行- Batch equivalent of "source" on Windows: how to run a Python script from a virtualenv
https://stackoverflow.com/questions/57915542
复制相似问题