drufat/triangle

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

cianwilson opened this issue · 5 comments

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

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
#13, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVdvodRVvHgZqFTQ1v0COeLO6Tr70MRks5qXkNFgaJpZM4JQ7Ag.

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.

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

Also, thanks to @LonelyDeer.

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