source ~/.profile 命令抛出奇怪的错误

The source ~/.profile command throw weird error

我正在尝试重新加载 shell,我在谷歌上搜索了很多,发现下面的命令可以修复它。但是当我 运行 命令时,我得到以下错误 python: can't open file './test.py': [Errno 2] No such file or directory.

rasminayak@DEBIAN-TEST:~$ source ~/.profile
python: can't open file './test.py': [Errno 2] No such file or directory
rasminayak@DEBIAN-TEST:~$

连我都试过了

rasminayak@DEBIAN-TEST:~$ source .bashrc
python: can't open file './test.py': [Errno 2] No such file or directory
rasminayak@DEBIAN-TEST:~$ 

您需要从 .bashrc

中删除 test.py 文件