1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

abc.py in PyCharm

Last updated at Posted at 2017-12-07

大したことないですが、一応メモ。

トラブルシューティング

abc.pyという名前でPyCharm上でスクリプトを実行するとこうなります。
逆にいえば、PyCharm上でこうなったらファイル名がabc.pyになっていないか確かめると良いと思います。

Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
  File "C:\Users\name\Anaconda3\lib\io.py", line 52, in <module>
  File "C:\Users\name\PycharmProjects\project_name\abc.py", line 1, in <module>
RuntimeError: input(): lost sys.stdin

原因はabcが標準モジュールであるために、PyCharmがそれをioに使用していて名前が衝突しているからですね。

結論

abc.pyをPyCharm上でメタ構文変数のつもりで書くと死にます。

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?