autoenv自动载入python虚拟环境

共276个字

1. 克隆项目到本地
    $ git clone git://github.com/kennethreitz/autoenv.git ~/.autoenv

2. 配置用户环境变量
    $ echo ‘source ~/.autoenv/activate.sh’ >> ~/.bashrc
3. 载入用户环境变量
    $ source ~/.bashrc
 
4. 写入虚拟环境到项目文件夹
    $ echo “source venv/bin/activate” > project/.env
    # venv/bin/activate 代表python的虚拟环境位置,project表示你的项目文件夹,需要手动修改

❤ 喜欢 2

5条回应:“autoenv自动载入python虚拟环境”

  1. 匿名说道:

    载入用户环境变量 $ source~ / .bashrc时报错 bash: ‘source: 未找到命令… 是为啥

  2. gamefly说道:

    Hi, the whole thing is going fine here and ofcourse every
    one is sharing facts, that’s really fine, keep up writing.

  3. Does your site have a contact page? I’m having problems
    locating it but, I’d like to send you an e-mail. I’ve got some ideas for
    your blog you might be interested in hearing. Either way,
    great website and I look forward to seeing
    it grow over time.

  4. Hello, I enjoy reading through your article post. I like
    to write a little comment to support you.

发表评论

必填项已用*标注

归档于 Cent OS, Mac OS, Ubuntu