Skip to content

Error installing on Mac Mavericks (virtualenv update from Mountain Lion) #10

@aurora1625

Description

@aurora1625

Hi, I have trouble install ad3 python on my mac.

I am running Python in virtualenv on Mavericks. I didn't perform a clean install from scratch, just upgraded from Mountain Lion. The Python environment is in a virtualenv, so this probably doesn't have anything to do with OSX.

Below is the output of the compilation.

$ python setup.py install
running install
running build
running build_ext
cythoning factor_graph.pyx to factor_graph.cpp
building 'ad3' extension
creating build
creating build/temp.macosx-10.8-intel-2.7
cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I../ -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c factor_graph.cpp -o build/temp.macosx-10.8-intel-2.7/factor_graph.o
In file included from factor_graph.cpp:316:
./../ad3/Factor.h:414:70: warning: control reaches end of non-void function
      [-Wreturn-type]
                  vector<int> *additional_evidence) { assert(false); }
                                                                     ^
In file included from factor_graph.cpp:318:
In file included from ./../ad3/FactorGraph.h:22:
./../ad3/FactorDense.h:167:8: warning: 'AD3::FactorDense::Initialize' hides
      overloaded virtual function [-Woverloaded-virtual]
  void Initialize(const vector<MultiVariable*> &multi_variables) {
       ^
./../ad3/Factor.h:117:16: note: hidden overloaded virtual function
      'AD3::Factor::Initialize' declared here
  virtual void Initialize(const vector<BinaryVariable*> &binary_variables,
               ^
2 warnings generated.
In file included from factor_graph.cpp:316:
./../ad3/Factor.h:414:70: warning: control reaches end of non-void function
      [-Wreturn-type]
                  vector<int> *additional_evidence) { assert(false); }
                                                                     ^
In file included from factor_graph.cpp:318:
In file included from ./../ad3/FactorGraph.h:22:
./../ad3/FactorDense.h:167:8: warning: 'AD3::FactorDense::Initialize' hides
      overloaded virtual function [-Woverloaded-virtual]
  void Initialize(const vector<MultiVariable*> &multi_variables) {
       ^
./../ad3/Factor.h:117:16: note: hidden overloaded virtual function
      'AD3::Factor::Initialize' declared here
  virtual void Initialize(const vector<BinaryVariable*> &binary_variables,
               ^
2 warnings generated.
creating build/lib.macosx-10.8-intel-2.7
c++ -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot / -L/usr/local/lib -L/usr/local/opt/sqlite/lib build/temp.macosx-10.8-intel-2.7/factor_graph.o -L../ad3/ -lad3 -o build/lib.macosx-10.8-intel-2.7/ad3.so
ld: warning: ignoring file ../ad3//libad3.a, file was built for archive which is not the architecture being linked (i386): ../ad3//libad3.a
running install_lib
copying build/lib.macosx-10.8-intel-2.7/ad3.so -> /Users/sean/.virtualenvs/mycode/lib/python2.7/site-packages
running install_egg_info
Writing /Users/sean/.virtualenvs/mycode/lib/python2.7/site-packages/UNKNOWN-0.0.0-py2.7.egg-info

Next is the error information from iPython

In [1]: import ad3
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-76c6d01e3bb1> in <module>()
----> 1 import ad3

/Users/sean/github/AD3/python/ad3/__init__.py in <module>()
----> 1 from factor_graph import PBinaryVariable, PFactorGraph, PMultiVariable
      2 from simple_inference import simple_grid, general_graph

ImportError: No module named factor_graph

I did check the __init__.py file, and there is no factor_graph in it, and that UNKNOWN egg in site-package is probably have something to do with the failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions