## toll_booth

Hi everyone, I just downloaded and installed numpy, and I'd like to give it a try. But I can't seem to import it. When I try, this is what happens:

Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit (Intel)] on win32
>>> from numpy import *
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from numpy import *
ImportError: No module named 'numpy'
>>>

I downloaded and installed the 64-bit version; is that the problem? Or do I need to somehow set up the paths properly?

## Gribouillis 1,391

I don't use windows, but I found this blog entry, which is about 1 and a half year old, about possible issues. It may help you.

## vegaseat 1,720

Strange, never had any problems with numpy and Python33.
I used the numpy-MKL-1.6.2.win32-py3.3.exe installer

## vegaseat 1,720

Just updated numpy with
numpy-MKL-1.7.1.win32-py3.3.exe
and it works well.

Example used for test ...

''' np_primelist1.py
create a numpy array of prime numbers < limit
very fast algorithm
used Windows installer ...
numpy-MKL-1.7.1.win32-py3.3.exe
'''

import numpy as np

def np_primes1(limit):
"""returns a numpy array of primes, 2 <= p < limit"""
# create a sieve of ones
is_prime = np.ones(limit + 1, dtype=np.bool)
for n in range(2, int(limit**0.5 + 1.5)):
if is_prime[n]:
is_prime[n*n::n] = 0
return np.nonzero(is_prime)[0][2:]

print("first 10 primes:")
print(np_primes1(1000000)[:10])
print("last 5 primes (less than 1000000):")
print(np_primes1(1000000)[-5:])
print("convert first 10 primes to a list:")
print(list(np_primes1(1000000)[:10]))

''' result ...
first 10 primes:
[ 2  3  5  7 11 13 17 19 23 29]
last 5 primes (less than 1000000):
[999953 999959 999961 999979 999983]
convert first 10 primes to a list:
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
'''