can‘t open file ‘/train.py‘: [Errno 2] No such file or directory

问题描述: ssh连接pycharm和服务器,在Python Interpreter中选择好了已经创建好的环境,运行时报错:

ssh://[email protected]:10002/root/anaconda3/envs/py37/bin/python3.7 -u E:/mdistiller-master/tools/train.py
bash: line 0: cd: E:/mdistiller-master/tools: No such file or directory
/root/anaconda3/envs/py37/bin/python3.7: can't open file 'E:/mdistiller-master/tools/train.py': [Errno 2] No such file or directory

解决方法: 在pycharm中打开 File–>Setting–>Project–>Python Interpreter–>Path mappings 设置映射路径(每运行一个新项目,都要重新设置映射路径)
can‘t open file ‘/train.py‘: [Errno 2] No such file or directory_第1张图片
发现路径为空,所以找不到文件,重新设置即可

你可能感兴趣的:(学习笔记,bug排错,pycharm,python,ide)