Crash of matplotlib window with anaconda

37 Views Asked by At

I'm currently trying to run this python script in VSCODE with a miniconda kernel:

import matplotlib.pyplot as plt
import numpy as np

X = np.random.rand(100)
Y = np.random.rand(100)

plt.scatter(X,Y)
plt.show()

The problem is that the matplotlib window opens and crahes directly. If I paste the code on a notebook it works perfectly and print the figure but from a .py file it keeps crashing. I recently moved to conda and I hadn't had this problem on a classic python version.

I tried to install matplotlib through conda or pip but the result is the same. I also tried to downgrade freetype but it didn't work. I also updated conda and every packages to their latest version. If anyone has an idea on how to solve this, please let me know.

0

There are 0 best solutions below