Wakeupbuddy / amodalAPI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't run with Anaconda environment

kastnerkyle opened this issue · comments

The story so far (copied from chat)

I am using anaconda and had to additionally symlink coco/common in amodalApi to get maskApi.h for build_ext to work

it builds but is still unhappy... ImportError: pycocotools/_mask.so: undefined symbol: PyFPE_jbuf
investigating now, seems related to numpy versions or somesuch. May be an environment problem.

looks like the cython generated c is referencing system python... /usr/local/lib/python2.7/dist-packages/numpy/core/include . After recreating the cython file, it references the python I expect but it still gives the PyFPE_jbuf error.

Thanks, I am looking now. I saw a similar issue in the cocoApi yesterday:
cocodataset/cocoapi#35

btw, can you run the original cocoApi in this machine?

Yes, all is well in the coco api itself with the ipynb examples

When I run in the terminal (not notebook) I get a different error

python -c 'from pycocotools.amodal import Amodal'

Gives

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/kkastner/anaconda2/lib/python2.7/site-packages/pycocotools/amodal.py", line 58, in <module>
    import mask
  File "/home/kkastner/anaconda2/lib/python2.7/site-packages/pycocotools/mask.py", line 3, in <module>
    import pycocotools._mask as _mask
ImportError: /home/kkastner/anaconda2/lib/python2.7/site-packages/pycocotools/_mask.so: undefined symbol: rleMinus

oh my bad, I modified maskApi.c, but didn't include the code here...

Let me add those modified files.

It's fixed after your pushed files! Thanks a lot.

np:)

I am still testing the installation on a brand new aws machine. I will need to add a bunch of dependecies in readme.

I still get errors in jupyter notebook but commandline is fine. It might be in my environment, I will keep looking too :)

can you copy the error log ?

I am copy pasting more and more of the notebook into a .py file, and so far it seems fine. So I am unsure what is going on...

unfortunately I cannot reprod this.

After some googling, I am thinking could it because the "pycocotools/_mask.so" is confilcting with your previous installation of cocoAPI?

Maybe try using virtualenv to create a separate python environment?

OK, so with myAmodalDemo.ipynb in the main dir it is working, other than some tiny path issues (due to copying up one dir). So I am unsure what that error was, beyond (my guess) imports getting confused by a pycocotools in "." and also "~/anaconda2/lib/site-packages/python2.7"

or because your ipython and python are using different environment?

which python
which ipython

are they from same path?

Yes, both from ~/anaconda2/bin

You can close if you like, I think it is path related due to running jupyter notebook in the PythonAPI dir directly.

okay, feel free to reopen if new error bothers.

I will cleanup the code and enrich readme/installation probably after cvpr rebuttal.

OK sounds good, thanks again for your help!