0

I have a problem with the Spyder software of Python(version 4.0.1) regarding the running kernels in the IPython Console. Accordingly, I have tried many ways to resolve the issue like running some commands in Anaconda prompt or set the settings to the default mode. I even updated the version of my anaconda and the spyder. Nevertheless, nothing has been changed and the issue still exists.

This is the error I am receiving:

Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\ProgramData\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console__main__.py", line 11, in start.main() File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 287, in main import_spydercustomize() File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\console\start.py", line 39, in import_spydercustomize import spydercustomize File "C:\ProgramData\Anaconda3\lib\site‑packages\spyder_kernels\customize\spydercustomize.py", line 24, in from IPython.core.getipython import get_ipython File "C:\ProgramData\Anaconda3\lib\site‑packages\IPython__init__.py", line 56, in from .terminal.embed import embed File "C:\ProgramData\Anaconda3\lib\site‑packages\IPython\terminal\embed.py", line 14, in from IPython.core.magic import Magics, magics_class, line_magic File "C:\ProgramData\Anaconda3\lib\site‑packages\IPython\core\magic.py", line 20, in from . import oinspect File "C:\ProgramData\Anaconda3\lib\site‑packages\IPython\core\oinspect.py", line 30, in from IPython.lib.pretty import pretty File "C:\ProgramData\Anaconda3\lib\site‑packages\IPython\lib\pretty.py", line 82, in import datetime File "C:\Users\mahkam\datetime.py", line 4 ^ SyntaxError: EOF while scanning triple‑quoted string literal

2 Answers 2

0

(Spyder maintainer here) You need to rename or remove this file

C:\Users\mahkam\datetime.py

That's because that file is using the same name of Python internal module and that confuses other modules that depend on it.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks a million. I removed the mentioned file and now everything is all right.
Great! Then please mark my answer as correct by clicking on the green check sign on the left.
0

Looks like you have a quoting error

File "C:\Users\mahkam\datetime.py", line 4 ^ SyntaxError: EOF while scanning triple‑quoted string literal

Check out your datetime.py

1 Comment

Yes, that's exactly the problem. Thanks a lot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.