With Jupiter Notebook I was able to run the following code to display a simple chart.
import matplotlib.pyplot as plt
squares = [1, 4, 9, 16, 25]
plt.plot(squares)
plt.show()
Now I tried the same in sublime text and it does not work, I am always getting the following error message:
ModuleNotFoundError: No module named 'matplotlib'
I tried to change the Python build system with the following code, but it did not work.
{
"cmd": ["python", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python",
"shell": true
}
Does anyone have an idea how I have to move the matplotlib library to use it within sublime text?
Thanks in advance!
I solved my problem by deleting anaconda (and matplotlib with it) and loading anaconda again. This might be a little strange, but it worked and my simple code example is working now.
For deleting anaconda I justed the following manual: How to uninstall Anaconda completely from MacOS
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.