can't read /var/mail/__future__

问题描述:

    在当前目录下有一个 test.py 文件,我试图直接执行这个 test.py:

./test.py

报错:

can't read /var/mail/__future__

经过一番搜索,原因是:

使用 ./ + 文件名,系统默认会调用 bash 执行 test.py 而不是 python 解释器 !

解决方案:

python test.py

OK !

猜你喜欢

转载自blog.csdn.net/yangguangqizhi/article/details/81076145