Ask Your Question
0

Problem importing matplotlib.pyplot and numpy in python2.7

asked 2022-05-10 21:05:02 -0500

brownkid gravatar image

updated 2022-05-16 12:22:44 -0500

jconto gravatar image

I face problem while importing matplotlib.pyplot and numpy. I am using python2.7 for psse33 so that I can use dyntools. Tried installing using pip but error pops up. Help please

So I want to plot multiple channel out files so that multiple cases for different channels can be seen as a plot. I use python2.7 for psse33 to utilize dyntools module. But I cannot use numpy and matplotlib as this aren't already installed in pss33 packages. I tried to install using pip install numpy command but error pops up.

I tried using python39 since numpy and matplotlib is already installed. But I cannot proceed further as error is there "dyntools - bad magic number"

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2022-05-16 10:54:51 -0500

jconto gravatar image

If you want multiple python versions installed, during a python installation, do not 'check' the option to 'set as default' for any python version. To activate a version, open a CMD window, set the environ variable "PYTHONHOME" to the path of the python version to be activated (like PYTHONHOME=c:\python27)

On situations like yours, I would uninstall all python versions and PSSe versions as well, then install them back. Every python installed should allow for adding additional modules using pip, else something went wrong.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2022-05-10 21:05:02 -0500

Seen: 1,981 times

Last updated: May 16 '22