84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
我是想在py脚本执行时,激活指定的环境。可以做到吗?
PS:我是李世石,我已经弃围棋从AI了,大家多指教!
小伙看你根骨奇佳,潜力无限,来学PHP伐。
sys.path.insertYour environment directory. For example:
sys.path.insert
sys.path.insert(0, "/tmp/python2.7.8/lib/python2.7/site-packages/")
Yes, you need to use the absolute path to specify the python you use (in the virtual environment). The rough writing method is as follows
/PATH/venv/bin/python /PATH/script.py
Spend half an hour and read through the documentation of virtualenvwrapper, and all the problems will be solved
sys.path.insert
Your environment directory. For example:Yes, you need to use the absolute path to specify the python you use (in the virtual environment). The rough writing method is as follows
Spend half an hour and read through the documentation of virtualenvwrapper, and all the problems will be solved