[英]Is there a problem with github and Python 3.8? Why can't I run this code?
I'm trying to run this code:我正在尝试运行这段代码:
!git clone https://github.com/sorki/python-mnist
!./python-mnist/get_data.sh
!pip3 install emnist
from emnist import extract_training_samples
But the following error message appears:但是出现以下错误信息:
Traceback (most recent call last):
File "/Users/silteliz/Desktop/Solo Learn Python/NN 1.py", line 1
!git clone https://github.com/sorki/python-mnist
^
SyntaxError: invalid syntax
I have Python 3.8.我有 Python 3.8。 Does anybody know what the problem might be?
有谁知道问题可能是什么?
You can only use !
你只能使用
!
if you're using ipython
, for instance in Jupyter Notebook or the console of PyCharm if you enabled ipython
as the default console interface.如果您使用
ipython
,例如在 Jupyter Notebook 或 PyCharm 的控制台中,如果您启用ipython
作为默认控制台界面。 If this is not the case, drop the !
如果不是这种情况,请删除
!
and write the rest of your code in cmd
.并在
cmd
中编写其余代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.