Code Monkey home page Code Monkey logo

Comments (1)

wroberts avatar wroberts commented on May 28, 2024

Hi, thanks for the bug report. This is exactly the right place to discuss this issue.

Daedalus is Windows software, but for this project I just bolted a cython interface onto the side of it; therefore, pydaedalus does not require Windows (in fact, I've never tested it on Windows, I've only ever built it on Mac and Linux).

The _maze python extension is meant to be built with the setup.py script, and this should get called by pip automatically. If you're not able to import _maze, that on the face of it suggests a build error on your machine to me (more on this in a second). Before we get into that, though: why is your traceback showing pydaedalus under your ~/Documents directory? Surely that can't be where anaconda puts installed packages? I'd suggest trying the test code again, making sure that your working directory is not /Users/bbeckman/Documents/pydaedalus, just in case Python is loading from an uncompressed source download that doesn't have the extension compiled.

I can't remember quite what happens when pip fails to build an extension, but you can try checking that things look OK. If you pip unistall pydaedalus and then reinstall, you can watch the build happening; if anything is breaking, this is where it's happening. For me, pip hides output unless I ask it to be verbose (like -v; I use -vvv):

sudo pip install --no-use-wheel -vvv pydaedalus

With verbose output, I can watch the compiler (clang++ for me) getting called, and there's miles of warnings dumped (daedalus uses quite a bit of old-style C code that modern C++ compilers get grumpy about), but no errors. The last lines look like:

/usr/bin/clang++ -bundle -undefined dynamic_lookup -isysroot / -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db48 build/temp.macosx-10.11-x86_64-2.7/daedalus/_maze.o build/temp.macosx-10.11-x86_64-2.7/daedalus/wrapper.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/daedalus.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/maze.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/solve.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/util.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/graphics.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/color.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/create.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/create2.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/create3.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/labyrnth.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/threed.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/draw.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/inside.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/command.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/solids.o build/temp.macosx-10.11-x86_64-2.7/daedalus/src/draw2.o -o build/lib.macosx-10.11-x86_64-2.7/daedalus/_maze.so
running install_lib
creating /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/daedalus
copying build/lib.macosx-10.11-x86_64-2.7/daedalus/__init__.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/daedalus
copying build/lib.macosx-10.11-x86_64-2.7/daedalus/_maze.so -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/daedalus
creating /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/daedalus/test
copying build/lib.macosx-10.11-x86_64-2.7/daedalus/test/__init__.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/daedalus/test
copying build/lib.macosx-10.11-x86_64-2.7/daedalus/test/test_maze.py -> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/daedalus/test
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/daedalus/__init__.py to __init__.pyc
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/daedalus/test/__init__.py to __init__.pyc
byte-compiling /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/daedalus/test/test_maze.py to test_maze.pyc
running install_egg_info
running egg_info
writing pydaedalus.egg-info/PKG-INFO
writing top-level names to pydaedalus.egg-info/top_level.txt
writing dependency_links to pydaedalus.egg-info/dependency_links.txt
reading manifest file 'pydaedalus.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'LICENSE.md'
warning: no files found matching 'daedalus/src/unused'
writing manifest file 'pydaedalus.egg-info/SOURCES.txt'
Copying pydaedalus.egg-info to /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pydaedalus-0.1.3-py2.7.egg-info
running install_scripts
writing list of installed files to '/tmp/pip-466Qfv-record/install-record.txt'
done
Removing source in /private/tmp/pip-build-L1nFfg/pydaedalus

So you can see that my extension module lives at /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/daedalus/_maze.so (I'm on OS X 10.11 using Py2.7 installed with MacPorts).

As a final note, there's always the disappointing possibility that yer Mac OS X just plain doesn't have a C compiler; after all, Apples don't ship with compilers installed, you gotta do it yourself. If running both which clang++ and which g++ in your shell doesn't report any paths, this may be your problem; see How to install a C compiler for more.

from pydaedalus.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.