Home > Python Cannot > Python Cannot Export Symbol Not Defined

Python Cannot Export Symbol Not Defined

Let us know what the following returns: python -c "import sys; print sys.platform" pyne member erelson commented Jun 13, 2012 I get 'None' with the first command, and win32 with the However if you type "import _example", it'll succeed. You signed out in another tab or window. Get the interface file from the same location and save a local copy in your working directory as say sample.i. 3. check over here

reply Tweet Search Discussions Search All Groups cython-users 1 response Oldest Nested WillFurnass Forgot to mention in my previous post that I'm using MinGW GCC v4.5.2 and encounter the problem regardless Is there a --compiler option that handles things properly? (I tried --compiler=cygwin but the Distutils documentation suggests that this is intended for building extensions to win32 Python and it does not At the moment my work laptop is running Windows and when compiling the module got the following error: C:\MinGW32-xy\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python27\include -IC:\Python27\PC -c src/cpp/mydpss.c -o build\temp.win32-2.7\Release\src\cpp\mydpss.o writing build\temp.win32-2.7\Release\src\cpp\mydpss.def pyne member scopatz commented May 1, 2012 @paulromano, This error is likely because there is some Visual Studio specific code that is #def'd that you are hitting.

Note that there is a typo: you are missing "[" right after "sources=".After running setup.py, the import worked fine.Python 2.6.5 (r265:79063, Jun 12 2010, 17:07:01)[GCC 4.3.4 20090804 (release) 1] on cygwinType Are you using epd? Worst case, I'll give EPD a try tomorrow. Try running the following on its own instead, where the Python linking has been removed: C:\MinGW\bin\g++.exe -shared -s build\temp.win32-2.7\Release\cpp\pyne.o build\temp.win32-2.7\Release\cpp\libpyne.def -Lbuild/lib/pyne/lib -Lbuild/lib.win32-2.7/pyne/lib -Wl,-R${ORIGIN} -Wl,-R${ORIGIN}/. -Wl,-R${ORIGIN}/../lib -Wl,-R${ORIGIN}/.. -lmsvcr90 -o build\lib.win32-2.7\pyne\lib\libpyne.dll That said,

Thanks for looking into it though! pyne member scopatz commented Jun 14, 2012 Hey @erelson, so it is using g++ by default because we are compiling C++ code ;). You may also install it separately from here or running the cygwin installer again and choose the mingw option along with its dependencies. I was working on this prior to discovering this thread (32bit XP, SP2, Python 2.7.3); Like paulromano, I also had to resolve problems with /EHsc and -mno-cygwin.

Probably Monday. c:\Python25\Lib\site_packages) . 8. >>> import example as e 9. >>> e.fact(5) 120 References : Here are several links I read up to get this example working - my thanks to all I presume it was this one: http://sources.redhat.com/ml/cygwin/2000-11/msg00526.html It refers to 2 methods of getting the necessary exports, the DL_EXPORT macro and .def files. Cython 0.18 is being used for C and C++code generation.

Join them; it only takes a minute: Sign up How to deal with “Cannot export init__init__: symbol not defined” up vote 1 down vote favorite 1 I was to install the Copy this file to the same location as above (e.g. Invoked git clone to get the most recent files, fiddled with setup.py to disable all the HDF stuff that failed, and voila, finished installing, and nosetests runs! How to solve it?

vim: multiple buffers vim: create function to remove white spaces Tag Cloud android awk bash bioservices books C CSS english fedora Firefox gimp git github graphviz HTML ipython iso latex Linux http://grokbase.com/t/gg/cython-users/133jvy7f1f/cannot-export-initadvect-symbol-not-defined Thanks :) pyne member scopatz commented Jun 18, 2012 Alright @erelson, so the good news is that I have figured out all of the crazy build issues related Windows. Installing and running in cygwin had no effect. August 7, 2011 at 8:52 PM Raghavan said... @ Dr.Bowers : thanks !

Occurred to me last night to directly replace the compiler line in unixccompiler.py: # compiler = os.path.basename(sysconfig.get_config_var("CC")) compiler = "C:\MinGW\bin\gcc.exe" And voila, I get past that system configuration problem... (Sidenote: If check my blog What happens when a wizard tries to cast a cone of cold through a wall of fire? Thanks for your post. I'm now getting TypeError: 'NoneType' object has no attribute '__ getitem __' with several of the calls to the cpp_ext() method. (i.e.

Bowers said... This did not work for me. Also has an interesting discussion about using Mingw32 directly Vs gcc on cygwin).

Posted by Raghavan at 3:38 AM Labels: code, cygwin, python, swig, windows 6 comments: ddp516 said... http://amigasuperbit.com/python-cannot/python-cannot-marshal-objects.html If we look at the actual command that you are executing, you are linking in Python itself....which doesn't happen on my Ubuntu machine.

This same error happens for all of the exts.append(cpp_ext(... The Python executable reports the following: Python 2.1 (#1, Apr 17 2001, 09:45:01) [GCC 2.95.3-2 (cygwin special)] on cygwin_nt-4.01 I then downloaded Numeric-20.0b2 from here http://prdownloads.sourceforge.net/numpy/Numeric-20.0.0b2.tar.gz unpacked it & attempted to Maybe it will be time to do a minor updated release after this is fixed.) Thanks for the info about HOME.

The explanation of the DLL handling helps.

Let me know if you run into any more trouble! Thanks for your support nevertheless! I was even able to revert the hard-coded compiler= line described earlier. Thanks, pushed. > > I'm still getting some other errors using autobuild.sh, but they are > independent of this one and shouldn't hold up this one from going in: I never

Is there some way to just set CC manually? Since EPD uses mingw, I imagine that mingw and cygwin will also both work. How do pilots identify the taxi path to the runway? have a peek at these guys I want to have the master distribution modified so it works OOTB.

I have Python 2.3, MinGW 3.2.3, ans SWIG 1.3.19. If all goes well, you should see no errors and upon completion, find a file named '_example.pyd' in your working directory. 6. This is the critical step ! Terms Privacy Security Status Help You can't perform that action at this time.

Is the Čech cohomology of an orbifold isomorphic to its singular cohomology? share|improve this answer answered Aug 16 '13 at 7:33 Dux 423322 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign Though it is untested, I have left MSVC specific code in there as well so there is a good chance that would work too! o example_wrap.c:170: warning: `SWIG_TypeDynamicCast' defined but not used example_wrap.c:182: warning: `SWIG_TypeName' defined but not used example_wrap.c:188: warning: `SWIG_TypeQuery' defined but not used example_wrap.c:423: warning: `SWIG_ConvertPtr' defined but not used example_wrap.c:515: warning:

I think that init is Python's way of doing module initialization and importing for compiled code. Create a setup.py file that contains all dependencies required to create the Python extension. You signed in with another tab or window. In the end: just a typo...

Running the line you gave gets the same error. I've actually been running everything in cmd, rather than cygwin. It should come in handy. This is a default function that get called when python inits your module.

My googling is fruitless...