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

xrange not defined in main.py #1

Closed
srushti93 opened this issue Mar 5, 2019 · 3 comments
Closed

xrange not defined in main.py #1

srushti93 opened this issue Mar 5, 2019 · 3 comments

Comments

@srushti93
Copy link

I am missing something in the code? Would appreciate your help on this. Thanks!

capture

@Pranshu258
Copy link
Owner

I guess you are using Python 3, "xrange" function is not available in Python 3.
Our code was written in Python 2, however, it should work if you replace "xrange" with "range".
Hope this helps

@srushti93
Copy link
Author

I downgraded my python to 2.7.4. But now I am getting this error:

Traceback (most recent call last):
File "main.py", line 10, in
import energy
File "/Users/jt6w/Desktop/Image_Completion-master/energy.py", line 4, in
import cv2, numpy as np, sys, math, operator, maxflow, random, config as cfg
File "/Users/jt6w/anaconda3/lib/python2.7/site-packages/maxflow/init.py", line 37, in
from . import _maxflow
ImportError: dlopen(/Users/jt6w/anaconda3/lib/python2.7/site-packages/maxflow/_maxflow.so, 2): Symbol not found: __ZNSs4_Rep20_S_empty_rep_storageE
Referenced from: /Users/jt6w/anaconda3/lib/python2.7/site-packages/maxflow/_maxflow.so
Expected in: dynamic lookup

I think this is a mac issue but I am not sure how can I resolve it. Any suggestions?

Thanks

@srushti93 srushti93 reopened this Mar 18, 2019
@Pranshu258
Copy link
Owner

Pranshu258 commented Mar 19, 2019

This is a known problem with PyMaxFlow on Mac, please go through the link given below, it should solve this issue.
pmneila/PyMaxflow#13

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