drufat / triangle

Python bindings to the triangle library
GNU Lesser General Public License v3.0
224 stars 53 forks source link

Getting error: unknown file type '.pyx' when installing from source #13

Closed cianwilson closed 7 years ago

cianwilson commented 7 years ago

I'm trying to build on a cluster where I'm having to manually install everything from source. When I run: python setup.py install --prefix=... I get the error:

building 'triangle.core' extension
error: unknown file type '.pyx' (from 'triangle/core.pyx')

I'm using:

Using the first answer here I modified setup.py with the attached patch and it worked. I'm not familiar with python setup so can't comment on why this is necessary on this cluster (but isn't necessary on my local machine) but wanted to flag it in case it's useful to anyone else.

drufat commented 7 years ago

Try upgrading setuptools. I am using version 23.1.0

On 7/20/16 8:48 AM, Cian Wilson wrote:

I'm trying to build on a cluster where I'm having to manually install everything from source. When I run: |python setup.py install --prefix=...| I get the error:

|building 'triangle.core' extension error: unknown file type '.pyx' (from 'triangle/core.pyx') |

I'm using:

  • python version 2.7.2
  • numpy version 1.6.2
  • setuptools version 18.4
  • cython version 0.24.1

Using the first answer here http://stackoverflow.com/questions/32528560/using-setuptools-to-create-a-cython-package-calling-an-external-c-library I modified |setup.py| with the attached patch https://github.com/drufat/triangle/files/374096/triangle-cythonize.txt and it worked. I'm not familiar with python setup so can't comment on why this is necessary but wanted to flag it in case it's useful to anyone else.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/drufat/triangle/issues/13, or mute the thread https://github.com/notifications/unsubscribe-auth/ABVdvodRVvHgZqFTQ1v0COeLO6Tr70MRks5qXkNFgaJpZM4JQ7Ag.

LonelyDeer commented 7 years ago

Hello @cianwilson. I've had such problem. Issue #12 is all about problems with installation. You sould use this advice. from @sinback (thank you, @sinback, again and again). It helped me, I think it will help you.

cianwilson commented 7 years ago

Many thanks @drufat, that fixed my problem (in a much neater way).

cianwilson commented 7 years ago

Also, thanks to @LonelyDeer.

jesse2013 commented 5 years ago

I met the same problem when I was installing rfoo. I upgrade setuptools to 40.2.0, still have the problem.

python version 2.7.5 numpy verson 1.15.1 setuptools version 40.2.0 cython version 0.28.5