-
Notifications
You must be signed in to change notification settings - Fork 136
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
no module named medpy.graphcut.maxflow #20
Comments
Mhh... since you found the .so file, the graphcut module compiled correctly. Why its not in the right location, I can't figure out right now (no access to my dev PC). Could you tell me with what command you installed MedPy? In develop mode? To user or system-wide library? The follow up error seems to indicate that enery_label.py is missing. Can you find the file in the directory? But again, the search path seems to be the git clone, rather than the library path, which is strange. Its unlikely, but from which folder are you trying to load MedPy? Its not Please let me know the details and I'll try to help ypu further. In general, the MedPy versions in the repository can be unstable and contain bugs. If you want to be on the save side, MedPy 0.2.2 is your right choice, although that version lacks much of the functionality found in the branch leading to the 0.3.0 release (whenever I find the time). Best, |
For sure! I installed MedPy using 'git clone...', and then 'python setup.py install' to my system-wide package directory ("//anaconda/lib"). Yes, I can find the 'energy_label.py' in the directory (both in the git clone directory and the installed package directory). I'm loading MedPy from my 'anaconda/lib/python3.5/site-packages' directory. With MedPy 0.2.2, I was still getting the same 'energy_label.py' problem :( Hope some of this information helps! Happy to share anything else you may need. |
I've looked into the matter and it seems to be largely a Python3 associated problem. You might try to change the includes in MedPy has been designed for Python2, not for for Python3. Most parts should be portable, but some are not. There are many issues connected with the version upgrade. During my testing right now, I e.g. figured out that the compilation of the maxflow module is done with libboost_python2 instead of libboost_python3 (whyever). Hence even if you manage to fix the import, it might not work! I would suggest that you switch your anaconda to python2.7 (which should be easy, according to their page) and then install MedPy (whichever version you want) again. This will hopefully solve all your problems. |
Notes to myself Beside the import (@see here) there seems to be a libboost issue when compiling maxflow Libboost and Python3 + Python2 problem |
The setup.py produces currently
in that order. |
The alternate version works. I think I need |
Possible solution is to replace in the setup.py
by
|
Fixed with 14c68d6 - I hope it does not cause other confusions! |
I just finished installing medpy (Release-0.3.0) in my Python library, but I'm running into a few issues.
What works:
medpy's io module (load, header)
What gives me problems:
medpy.graphcut
When I try and call medpy.graphcut, I run into the following error:
However, there's one major thing wrong with this error, which is that the directory it's referencing is where I cloned the package using git, NOT the package library where it was supposed to install the package. If I drop the 'maxflow.py' file into that folder (along with the .so file, which it subsequently requests after an error from running the same import function again), I get another error saying the following:
Could you please assist me in this matter?
Thanks!
The text was updated successfully, but these errors were encountered: