问题
I would like to install Potrace on my Windows 10 Computer and I will be using it with python 2.7.5. I am following the installation instruction from this site.( https://pypi.python.org/pypi/pypotrace) for Windows.
What I did so far
I installed MinGW – following these YouTube instructions [https://www.youtube.com/watch?v=DHekr3EtDOA]
I also download Agg-2.5 and potrace-1.15.win64 and put these 2 folders inside C:/src (see Picture 1)
Issue
However, I am stuck at this specific point of the installation instructions. It says:
I extracted both packages in my
C:\src
folder. Both are easy to build by executing./configure; make
and./autogen.sh;
make respectively, on MSYS prompt.
I have no idea how what that means or how to do it. I did find MSYS prompt but I have no idea what to write in the prompt to complete this step (see Picture 2).
回答1:
You are trying to build a 'C' extension in Windows. The Python docs have a basic introduction to what this means.
In practice, you need to install a 'C' build environment, then compile and link the code. You have chosen the MinGW environment, but there are others available. Given that you have instructions for MinGW, let's stick with that, so at this point you just need to run the compiler...
For 'C' applications, there is usually a complete toolchain to keep track of what files depend on others, what external dependencies you might need and the precise build settings you need to use. In this case, the libraries are using autotools. In order to invoke them, you need to run the commands that they show in the install instructions. So, for example:
cd C:\src\agg-2.5
./autogen.sh; make
cd C:\src\potrace-1.15.win64
./configure; make
If that all works fine, you should find the library files located in the directories mentioned later in the instructions. You should then be able to run your python build as per the rest of the instructions, install the extension and use it!
来源:https://stackoverflow.com/questions/46675346/installing-pypotrace-on-windows-10