学习python时遇到的一系列问题
1、python: can't open file 'tools/demo.py': [Errno 2] No such file or directory
切换到项目目录下 然后再运行
一般运行项目:
1、cd 项目路径 cd /home/wmt/CODE/Siamfc
2、python 要运行文件的相对路径 python ./bin/train.py 项目Siamfc中bin文件夹下的train.py
2、换源
1、一次性换源
pip install 包名 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
2、window下永久换源
①在红框路径下新建pip文件夹(查看->勾上隐藏的项目),然后在文件夹下新建一个 pip.txt文件
[global]
timeout = 6000
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com
②把文件后缀改成 .ini