我是靠谱客的博主 火星上鞋垫,这篇文章主要介绍实例:autoenv自动载入python虚拟环境,现在分享给大家,希望可以做个参考。

实例:autoenv自动载入python虚拟环境实例:autoenv自动载入python虚拟环境

克隆项目到本地

$ git clone git://github.com/kennethreitz/autoenv.git ~/.autoenv

配置用户环境变量

$ echo 'source ~/.autoenv/activate.sh' >> ~/.bashrc

载入用户环境变量

$ source ~/.bashrc

写入虚拟环境到项目文件夹

$ echo "source venv/bin/activate" > project/.env
# venv/bin/activate 代表python的虚拟环境位置,project表示你的项目文件夹,需要手动修改

本文地址:https://www.linuxprobe.com/autoenv-python.html

最后

以上就是火星上鞋垫最近收集整理的关于实例:autoenv自动载入python虚拟环境的全部内容,更多相关实例内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(69)

评论列表共有 0 条评论

立即
投稿
返回
顶部