问题描述:ssh连接pycharm和服务器,在Python Interpreter中选择好了已经创建好的环境,运行时报错:
ssh://root@192.168.0.104:10002/root/anaconda3/envs/py37/bin/python3.7 -u E:/mdistiller-master/tools/train.pybash: 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》对你有帮助,请点赞、收藏,并留下你的观点哦!