I want to import a .png file with
import matplotlib.pyplot as plt
O = plt.imread(\'C:/Users/myusername/Downloads/Mathe/Picture.png\')
I have th
If you're using Windows, that path may cause issues because of the direction of the slashes. Check out this article. You shouldn't hardcode paths because regardless of which direction of slash you use, it can break on other operating systems.
It should work with something like this:
import os
import matplotlib.pyplot as plt
picture_path = os.path.join("C:", "Users", "myusername", "Downloads", "Mathe", "Picture.png")
im = plt.imread(picture_path)