python虚拟环境virtualenvwrapper workon命令在sh文件中无法生效的解决方法
2021/11/16 1:09:50
本文主要是介绍python虚拟环境virtualenvwrapper workon命令在sh文件中无法生效的解决方法,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
问题:
workon在终端可以运行,可以看见找到了相关的虚拟环境
但是将workon命令写入sh文件后,如下图示,运行sh文件会提示workon: command not found
如何解决该问题:
找到你系统环境中的virtualenvwrapper.sh文件,将该文件路径写入sh文件中(如上图第二行所示),然后使用source命令激活,即可解决workon命令在sh文件中运行时无效的问题。
这篇关于python虚拟环境virtualenvwrapper workon命令在sh文件中无法生效的解决方法的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-08有遇到过吗?同样的规则 Excel 中 比Python 结果大
- 2024-03-30开始python成长之路
- 2024-03-29python optparse
- 2024-03-29python map 函数
- 2024-03-20invalid format specifier python
- 2024-03-18pool.map python
- 2024-03-18threads in python
- 2024-03-14python Ai 应用开发基础训练,字符串,字典,文件
- 2024-03-13id3 algorithm python
- 2024-03-13sum array elements python