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 just successfully executed the command make swig and I wanted to give my feedback on how I did it.
First things first, you should be able to execute make install in the root of the project. So before anything else, do this.
This should install LibXtract to /usr/local. If that didn't work execute following command: make install PREFIX=/usr/local
Next up, let's install swig:
In Ubuntu (or WSL for that matter). This is done by these commands:
git clone https://github.com/swig/swig.git
cd swig
sudo apt-get install automake
./autogen.sh
./configure
sudo apt-get install bison flex
make
sudo make install
You can choose where you want to clone the project to. I just did it in the folder where I want to use LibXtract.
when you'd execute 'make swig' in the root folder of the project you would probably get following error:
xtract_wrap.c:154:11: fatal error: Python.h: No such file or directory
# include <Python.h>
^~~~~~~~~~
compilation terminated.
This is because the devtools of Python aren't installed or your OS cannot find them.
Before installing the devtools, check your Python version with python --version. You should install the right devtools for your version.
I still had a problem. Even though I installed the devtools, I couldn't import Python.h . I use anaconda and that was the problem.
Open swig/Makefile in an editor of your choice and change the value of the -I flag to the location of your devtools. In anaconda you'd get something like /home/youruser/anaconda3/include/python3.6m.
Hello, after building the python wrapper I am getting the error saying unbound variable xtract_free_window while trying to use the import xtract. I have compiled the xtract_wrap.c.
Hi
I just successfully executed the command
make swig
and I wanted to give my feedback on how I did it.First things first, you should be able to execute
make install
in the root of the project. So before anything else, do this.This should install LibXtract to /usr/local. If that didn't work execute following command:
make install PREFIX=/usr/local
Next up, let's install swig:
In Ubuntu (or WSL for that matter). This is done by these commands:
You can choose where you want to clone the project to. I just did it in the folder where I want to use LibXtract.
This is because the devtools of Python aren't installed or your OS cannot find them.
Before installing the devtools, check your Python version with
python --version
. You should install the right devtools for your version.An overview of all the commands in different OS's: https://icetutor.com/question/fatal-error-python-h-no-such-file-or-directory/
I still had a problem. Even though I installed the devtools, I couldn't import Python.h . I use anaconda and that was the problem.
Open
swig/Makefile
in an editor of your choice and change the value of the-I
flag to the location of your devtools. In anaconda you'd get something like/home/youruser/anaconda3/include/python3.6m
.So, on line 22 and 23 change these values:
Also, the provided test file is outdated. sei-nicolas created an alternative one in issue #93 (find it here)
I hope this helps!
cheers
The text was updated successfully, but these errors were encountered: