【发布时间】:2023-03-20 08:35:01
【问题描述】:
我正在学习并尝试在 Python3 中制作蛇游戏 我要进口乌龟
我正在使用:Linux mint 19、PyCharm、python37、python3-tk
Traceback (most recent call last):
File "/home/buszter/PycharmProjects/untitled1/snake.py", line 2, in <module>
import turtle
ModuleNotFoundError: No module named 'turtle'
我在读turtle的所有地方都应该预装,但我还是没有:(
我试过pip install turtle 说
pip install turtle
Collecting turtle
Using cached https://files.pythonhosted.org/packages/ff/f0/21a42e9e424d24bdd0e509d5ed3c7dfb8f47d962d9c044dba903b0b4a26f/turtle-0.0.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-kvf9on0y/turtle/setup.py", line 40
except ValueError, ve:
^
SyntaxError: invalid syntax
-------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-kvf9on0y/turtle/
编辑
pycharm中项目设置截图
【问题讨论】:
标签: python-3.x turtle-graphics