0

I just got Ubuntu and I'm trying to experiment abit with emacs. Wrote a simple python code that was supposed to make a plot, but when I try to run the code I get this message; ImportError: cannot import name '_imaging' from 'PIL' (/usr/lib/python3/dist-packages/PIL/init.py) And also I get alot of other random stuff, but I think this is the actual error. I generally want to run the code from the terminal window, and then get out the plot.

Here is the code:

import matplotlib.pyplot as plt
import numpy as np

t = np.arange(0.0,2.0,0.01)
s = 1 + np.sin(2*np.pi*t)
plt.plot(t,s)
plt.show()

1 Answer 1

1

I fixed the issue! Just used

pip install --upgrade --force-reinstall Pillow
Sign up to request clarification or add additional context in comments.

Comments

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.