First time here? Check out the FAQ!
1

matplotlib Ver 3.3.3 from Python Shell - <solved>

I'm having problems using Matplotlib on Linux Mint 20 (Ubuntu 20.04) from the python Shell

Traceback (most recent call last): Python Shell, prompt 1, line 967

builtins.AttributeError: partially initialized module 'matplotlib' has no attribute '__path__' (most likely due to a circular import)

During handling of the above exception, another exception was raised:

Traceback (most recent call last):

Runs program OK from green triangle

Iain

iain1940's avatar
66
iain1940
asked 2020-12-04 03:10:46 -0600, updated 2020-12-05 03:30:50 -0600
edit flag offensive 0 remove flag close merge delete

Comments

I'm able to run a simple example on ubuntu 20.10 with the system provided python & matplotlib and also matplotlib 3.3.3 installed via pip. What versions of Wing and python are you using? Also what code are you running in the Python Shell?

Wingware Support's avatar Wingware Support (2020-12-04 10:25:40 -0600) edit

I'm running Python 3.8.5 and WingPro 7.2.7.0

'import matplotlib' is the only command in the Python Shell.

The problem is comparatively minor as I am using scripts for almost all my work. The question was started before I realised that scripts worked OK.

Iain

iain1940's avatar iain1940 (2020-12-04 12:01:03 -0600) edit

Could you send the full traceback and exception to support@wingware.com?

Wingware Support's avatar Wingware Support (2020-12-04 17:13:29 -0600) edit
add a comment see more comments

1 Answer

1

Problem Solved. There was a file "matplotlib.py" in the current folder dating back to 2018 ! (the last time I played with matplotlib) which contained the line "import matplotlib.pyplot as plt"

Apologies - I should have examined the error message more carefully before suspecting other peoples software !

During handling of the above exception, another exception was raised: Traceback (most recent call last): Python Shell, prompt 1, line 1 # Used internally for debug sandbox under external interpreter
File "/home/**/winglets/matplotlib.py", line 8, in <module> import matplotlib.pyplot as plt builtins.ModuleNotFoundError: No module named' matplotlib.pyplot'; 'matplotlib' is not a package

iain1940's avatar
66
iain1940
answered 2020-12-05 03:30:31 -0600, updated 2020-12-05 03:32:13 -0600
edit flag offensive 0 remove flag delete link

Comments

Thanks for letting us know and don't hesitate to contact us when you run into problems.

Wingware Support's avatar Wingware Support (2020-12-07 10:06:45 -0600) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer