SyntaxError: multiple statements found when compiling one statement

I am in Python 3.3 and I only go into these 3 lines:

import sklearn as sk
import numpy as np
import matplotlib.pyplot as plt

I get this error:

SyntaxError: multiple statements found while compiling a single statement

What can i do wrong?

Edit: if someone comes across this question, the solution I found is to download Idlex and use its IDLE version, which allows multiple lines.

Screenshot: http://imgur.com/AJSrhhD

+2
source share
2 answers

In a shell, you cannot execute more than one statement at a time:

>>> x = 5
y = 6
SyntaxError: multiple statements found while compiling a single statement

You need to execute them one at a time:

>>> x = 5
>>> y = 6
>>>

, , script, . .

+6

xlrd urllib.request ssl http


???

SyntaxError:

0

Source: https://habr.com/ru/post/1653633/


All Articles