You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use pygco and I'm stuck in trying to compile it. I tried compiling in both Windows and Ubuntu but with no luck.
Is there a guide on how I should compile the whole folder or which files to compile? I tried starting from GCOptimization but I got too many errors.
Note: I'm using it for a python project where I try to colorize an image by using the graph cut method. My gcc version is 5.4.0
I also tried using pip and it installed pygco=0.0.1 but when I try to import it, it doesn't recognize it.
I think using pip will be the easiest method. Make sure that you're using the pip that belongs to the environment you're executing in.
If pip throws any errors, please post them here.
Also, this code should probably be considered unmaintained, I haven't worked on or with this for several years.
are you sure that the executing environment is the same as the environment that pip installed into?
Are you executing a script? If so, try which python and which pip. You can also do python -m pip install pygco
There should be a folder that's just called pygco in addition to the dist-info folder. Remove the dist-info folder and do the pip install again. It looks like you did some partial install or uninstall at some point.
make sure you have the standard libraries for C++ installed. As a warning the GCO code has been unmaintained for many years so you're mostly on your own there.
Activity
amueller commentedon Oct 2, 2020
I think using pip will be the easiest method. Make sure that you're using the pip that belongs to the environment you're executing in.
If pip throws any errors, please post them here.
Also, this code should probably be considered unmaintained, I haven't worked on or with this for several years.
leronjulian commentedon Dec 9, 2020
I'm getting the same issue as above after installing it using pip.
It gives: No module named 'pygco'
I import it like so:
import pygco
amueller commentedon Dec 9, 2020
are you sure that the executing environment is the same as the environment that pip installed into?
Are you executing a script? If so, try
which pythonandwhich pip. You can also dopython -m pip install pygcoleronjulian commentedon Dec 9, 2020
Yes they are. I am trying to execute example.py. When I try
which pythonandwhich pipI get:/Users/Shared/miniconda3/envs/myenv/bin/pythonand/Users/Shared/miniconda3/envs/myenv/bin/pipamueller commentedon Dec 10, 2020
hm that looks ok. what's the output of
pip install pygco?leronjulian commentedon Dec 10, 2020
Requirement already satisfied: pygco in /Users/Shared/miniconda3/envs/myenv/lib/python3.7/site-packages (0.0.1)Requirement already satisfied: numpy in /Users/Shared/miniconda3/envs/myenv/lib/python3.7/site-packages (from pygco) (1.16.6)Requirement already satisfied: cython in /Users/Shared/miniconda3/envs/myenv/lib/python3.7/site-packages (from pygco) (0.29.21)amueller commentedon Dec 10, 2020
and pygco exists in
/Users/Shared/miniconda3/envs/myenv/lib/python3.7/site-packages?leronjulian commentedon Dec 10, 2020
Yes it does
amueller commentedon Dec 10, 2020
There should be a folder that's just called
pygcoin addition to the dist-info folder. Remove the dist-info folder and do the pip install again. It looks like you did some partial install or uninstall at some point.leronjulian commentedon Dec 10, 2020
I did that, now I'm trying to reinstall it using pip and I'm getting the error
gco_python.cpp:626:10: fatal error: 'ios' file not found #include "ios"amueller commentedon Dec 10, 2020
make sure you have the standard libraries for C++ installed. As a warning the GCO code has been unmaintained for many years so you're mostly on your own there.
leronjulian commentedon Dec 11, 2020
I got it working. Thanks!
hfpro commentedon Nov 6, 2021
please share how you managed to install this library
rfmac-perceptus commentedon Jan 18, 2023
I just got a simple fix and I'm going to let it here for the next people with the same problem.
First explaining, I was with exactly the same problem than in this issue, that is, I installed pygco with:
But when running a script the result was:
Then running
pip install pygcoagain I got into thesite-packagesfolder and could find thepygco-0.0.1.dist-infosub-folder.Then to solve I simply ran:
Which upgraded pygco version from
0.0.1to0.0.16and the problem was solved.Hope that it helps someone! 😊
genuineotkau commentedon Dec 13, 2024
It worked! Thanks!