Pyrex installation on windows XP: step-by-step guide

Jim Lewis jim.lewis at miclog.com
Mon May 22 20:38:40 EDT 2006


Still problems :-(

I have a directory c:\data\code\test\pyrex containing:

build_and_install.bat:
"C:\program files\Python\python.exe" setup.py build_ext
--compiler=mingw32
pause

setup.py:
from distutils.core import setup
from distutils.extension import Extension
from Pyrex.Distutils import build_ext
setup(
  name = "PyrexGuide",
  ext_modules=[
    Extension("worldimport", ["world.pyx"])
    ],
  cmdclass = {'build_ext': build_ext}
)

world.pyx - pyrex code

run.py:
import worldimport
...
========================
The batch file creates a build folder with subfolders containing:
world.pyd, world.def,  world.o, worldimport.def

But running run.py gives: "ImportError: No module named worldimport"

Should worldimport.def be going to C:\program
files\python\Lib\site-packages?
Why isn't it?




More information about the Python-list mailing list