Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run with Anaconda environment #1

Closed
kastnerkyle opened this issue Jan 26, 2017 · 17 comments
Closed

Can't run with Anaconda environment #1

kastnerkyle opened this issue Jan 26, 2017 · 17 comments

Comments

@kastnerkyle
Copy link
Collaborator

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.

@Wakeupbuddy
Copy link
Owner

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?

@kastnerkyle
Copy link
Collaborator Author

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

@kastnerkyle
Copy link
Collaborator Author

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

@Wakeupbuddy
Copy link
Owner

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

Let me add those modified files.

@kastnerkyle
Copy link
Collaborator Author

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

@Wakeupbuddy
Copy link
Owner

Wakeupbuddy commented Jan 26, 2017

np:)

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

@kastnerkyle
Copy link
Collaborator Author

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

@Wakeupbuddy
Copy link
Owner

can you copy the error log ?

@kastnerkyle
Copy link
Collaborator Author

kastnerkyle commented Jan 26, 2017 via email

@Wakeupbuddy Wakeupbuddy reopened this Jan 26, 2017
@kastnerkyle
Copy link
Collaborator Author

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...

@Wakeupbuddy
Copy link
Owner

Wakeupbuddy commented Jan 26, 2017

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?

@kastnerkyle
Copy link
Collaborator Author

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"

@Wakeupbuddy
Copy link
Owner

or because your ipython and python are using different environment?

which python
which ipython

are they from same path?

@kastnerkyle
Copy link
Collaborator Author

Yes, both from ~/anaconda2/bin

@kastnerkyle
Copy link
Collaborator Author

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

@Wakeupbuddy
Copy link
Owner

okay, feel free to reopen if new error bothers.

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

@kastnerkyle
Copy link
Collaborator Author

OK sounds good, thanks again for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants