プログラミング初心者はこちら。Python IDLE で「pprint をインポート」しようとすると、次のエラーが発生します。
>>> import pprint
Traceback (most recent call last):
File "<pyshell#21>", line 1, in <module>
import pprint
File "C:\Python34\pprint.py", line 10, in <module>
pprint(count)
NameError: name 'pprint' is not defined
コマンドラインで「pip install pprint」を試みると思ったが、それもうまくいかなかった:
PS C:\Python34> pip install pprint
Collecting pprint
Could not find a version that satisfies the requirement pprint (from versions: )
No matching distribution found for pprint
Python 3.4.3 には pprint モジュールが付属していると思っていました。どうすれば機能しますか?pprint をインポートできないようですが、他のすべてのモジュールは正常に動作しています。Automate The Boring Stuff with Python のいくつかの演習を完了するには、pprint モジュールが必要です。私の質問を見てくれてありがとう。