I have 64-bit Windows 7 and 64-bit Python installed.
C:\Work\Python>python
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
I installed primesieve using this:
C:\Work\Python>pip install primesieve
Collecting primesieve
Using cached primesieve-1.3.0-cp36-cp36m-win_amd64.whl
Installing collected packages: primesieve
Successfully installed primesieve-1.3.0
I am then trying to run a Python program/script which is
importing this primesieve library but I am getting this error:
C:\Work\Python>run 500A
C:\Work\Python>python EulerProblem500A.py
Traceback (most recent call last):
File "EulerProblem500A.py", line 1, in <module>
import primesieve # pip install primesieve
File "C:\Programs\Python36\lib\site-packages\primesieve\__init__.py", line 1, in <module>
from primesieve._primesieve import *
ImportError: DLL load failed: %1 is not a valid Win32 application.
I don't understand this error since the versions of OS, Python and primesieve library all match.
Any ideas?!