Note that there are some explanatory texts on larger screens.

plurals
  1. PO"ImportError: No module name polygon", There is no place to download the module polygon
    primarykey
    data
    text
    <p>I am trying to Run a program made in python and I get the error:</p> <p>"ImportError: No module name polygon"</p> <p>I am using ubuntu, python 2.7 and EPD 7.3-1.</p> <p>How can I download the package and the C-extension of module Polygon for python?</p> <p>I've tried with:</p> <pre><code>sudo apt-get install python-polygon sudo apt-get install python-polygon2 </code></pre> <p>And nothing happened.</p> <p>I downloaded the zip file: "Polygon2-2.0.6.rar" from the autor's page. After that i extract Polygon2-2.0.6.rar onto Polygon2-2.0.6, then i go to that folder and run python setup.py install</p> <p>wich give me: </p> <pre><code>jose@jose-Satellite-L845:~/Descargas/Polygon2-2.0.6$ python setup.py install Using NumPy extension! running install running build running build_py running build_ext building 'Polygon.cPolygon' extension x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DDEFAULT_STYLE=STYLE_LIST -DWITH_NUMPY=1 -Isrc -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c src/gpc.c -o build/temp.linux-x86_64-2.7/src/gpc.o src/gpc.c: In function ‘gpc_read_polygon’: src/gpc.c:1037:9: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fp, "%d", &amp;(p-&gt;num_contours)); ^ src/gpc.c:1044:11: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fp, "%d", &amp;(p-&gt;contour[c].num_vertices)); ^ src/gpc.c:1047:13: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fp, "%d", &amp;(p-&gt;hole[c])); ^ src/gpc.c:1054:13: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fp, "%lf %lf", &amp;(p-&gt;contour[c].vertex[v].x), ^ src/gpc.c: In function ‘gpc_polygon_clip’: src/gpc.c:1471:31: warning: ‘dy’ may be used uninitialized in this function [-Wmaybe-uninitialized] build_intersection_table(&amp;it, aet, dy); ^ src/gpc.c:1460:12: warning: ‘yt’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (edge-&gt;top.y == yt) ^ src/gpc.c:1328:20: warning: ‘tr’ may be used uninitialized in this function [-Wmaybe-uninitialized] vclass= tr + (tl &lt;&lt; 1) + (br &lt;&lt; 2) + (bl &lt;&lt; 3); ^ src/gpc.c:1133:34: warning: ‘tl’ may be used uninitialized in this function [-Wmaybe-uninitialized] int vclass, bl, br, tl, tr; ^ src/gpc.c:1133:30: warning: ‘br’ may be used uninitialized in this function [-Wmaybe-uninitialized] int vclass, bl, br, tl, tr; ^ src/gpc.c:1133:26: warning: ‘bl’ may be used uninitialized in this function [-Wmaybe-uninitialized] int vclass, bl, br, tl, tr; ^ src/gpc.c:1330:12: warning: ‘contributing’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (contributing) ^ src/gpc.c: In function ‘gpc_tristrip_clip’: src/gpc.c:2131:31: warning: ‘dy’ may be used uninitialized in this function [-Wmaybe-uninitialized] build_intersection_table(&amp;it, aet, dy); ^ src/gpc.c:2120:12: warning: ‘yt’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (edge-&gt;top.y == yt) ^ src/gpc.c:1981:20: warning: ‘tr’ may be used uninitialized in this function [-Wmaybe-uninitialized] vclass= tr + (tl &lt;&lt; 1) + (br &lt;&lt; 2) + (bl &lt;&lt; 3); ^ src/gpc.c:1794:34: warning: ‘tl’ may be used uninitialized in this function [-Wmaybe-uninitialized] int vclass, bl, br, tl, tr; ^ src/gpc.c:1794:30: warning: ‘br’ may be used uninitialized in this function [-Wmaybe-uninitialized] int vclass, bl, br, tl, tr; ^ src/gpc.c:1794:26: warning: ‘bl’ may be used uninitialized in this function [-Wmaybe-uninitialized] int vclass, bl, br, tl, tr; ^ src/gpc.c:1983:12: warning: ‘contributing’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (contributing) ^ src/gpc.c:2062:16: warning: ‘cft’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (cft == LED) ^ src/gpc.c:2064:26: warning: ‘cf’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (cf-&gt;bot.y == yb) ^ x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DDEFAULT_STYLE=STYLE_LIST -DWITH_NUMPY=1 -Isrc -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c src/cPolygon.c -o build/temp.linux-x86_64-2.7/src/cPolygon.o src/cPolygon.c:4:20: fatal error: Python.h: No existe el archivo o el directorio #include &lt;Python.h&gt; ^ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 </code></pre> <p>Please help. Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload