简体   繁体   English

Python 3.4 Venv Bash激活脚本丢失

[英]Python 3.4 venv bash activate script missing

I'm trying to create a python virtual env with the following command: 我正在尝试使用以下命令创建python虚拟环境:

python -m venv myenv

The Scripts directory of the newly created myenv directory ends up containing the following activate scripts: 新创建的myenv目录的Scripts目录最终包含以下激活脚本:

  • activate.bat activate.bat
  • Activate.ps1 Activate.ps1

But it does not contain a bash activate script as I expected it to. 但是它不包含我期望的bash activate脚本。 I'm unable to run the activate.bat script in cygwin - batch syntax is not accepted: 我无法在cygwin中运行activate.bat脚本-不接受批处理语法:

line 1: @echo: command not found
line 3: rem: command not found
...

I suggest it might be linked to my python version which is 3.4 since the bash activate script is created when I try to do the same thing with Python 3.7 我建议将其链接到我的python 3.4版本,因为当我尝试使用python 3.7进行相同操作时会创建bash activate脚本

Any tips for getting it to work with Python 3.4 ? 有关使其与Python 3.4配合使用的任何提示?

Python 3.4 actually does not support venv properly. Python 3.4实际上不正确支持venv。 I updated to Python 3.6.7 to get the bash activate script. 我更新到Python 3.6.7以获得bash activate脚本。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM