I'm writing Python code. I want to check if numpy and wxpython are installed on machine. How to do that??
41
votes
7 Answers
63
votes
41
votes
19
votes
13
votes
3
votes
0
votes
I tried some methods, which did not work for me. The simplest way I found was to try to build a numpy array and then print it (see code below). If the array prints, numpy is installed, if array doesn't print, numpy is not installed.
import numpy as np
a=np.array([[1. ,2. ,3.], [4. ,5. ,6.]])
print(a)