【发布时间】:2016-03-04 03:46:05
【问题描述】:
我发现在我的 ubuntu15.10 上,我无法像这样执行 *.pyc 文件
$ echo 'print "Hello"' > print.py
$ chmod +x print.py
$ python -c 'import print'
$ ./print.pyc
但是在另一台PC(ubuntu15.10也是)上可以执行。在这个链接中( https://superuser.com/questions/73615/how-do-pyc-files-execute/73649#73649),我知道这是因为我的系统没有 .pyc 文件的 binfmt_misc 条目。所以我的问题是如何添加它。
【问题讨论】: