Installing PyPotrace on Windows 10

2024/10/11 2:18:21

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)

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.

picture3

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).

Picture2

Answer

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://en.xdnf.cn/q/69824.html

Related Q&A

dateutil 2.5.0 is the minimum required version

Im running the jupyter notebook (Enthought Canopy python distribution 2.7) on Mac OSX (v 10.13.6). When I try to import pandas (import pandas as pd), I am getting the complaint: ImportError: dateutil …

pytest fixture - get value and avoid error Fixture X called directly

I have updated pytest to 4.3.0 and now I need to rework test code since calling fixtures directly is deprecated. I have an issue with fixtures used in an unittest.TestCase, how do I get the value retur…

Django limit the number of requests per minute

Im trying to limit the number of requests from an IP in case I get too many requests from it. For example: if I will get more than 50 requests per minute I want to block that IP for 5 minutes. When I u…

How to add template variable in the filename of an EmailOperator task? (Airflow)

I cant seem to get this to work.I am trying to send daily a given file, whose name is like file_{{ds_nodash}}.csv.The problem is that I cant seem to add this name as the filename, since it seems it can…

Disadvantage of Python eggs?

Are there any disadvantages about using eggs through easy-install compared to the "traditional" packages/modules/libs?

Does Google App Engine Flex support Pipfile?

For App Engine Standard the explicitly state that they do not support Pipfiles and immediately block you from pushing your project if it contains a Pipfile. In searching the documentation, I dont see a…

Keras sees my GPU but doesnt use it when training a neural network

My GPU is not used by Keras/TensorFlow.To try to make my GPU working with tensorflow, I installed tensorflow-gpu via pip (I am using Anaconda on Windows)I have nvidia 1080tiprint(tf.test.is_gpu_availab…

Identify if there are two of the same character adjacent to eachother

Ive been asked to create a program that identifies if a password is valid or not. The one part I am struggling with is identifying whether there are two of the same character adjacent to each other. He…

Extract lined table from scanned document opencv python

I want to extract the information from a scanned table and store it a csv. Right now my table extraction algorithm does the following steps.Apply skew correction Apply a gaussian filter for denoising. …

Nested Python C Extensions/Modules?

How do I compile a C-Python module such that it is local to another? E.g. if I have a module named "bar" and another module named "mymodule", how do I compile "bar" so th…