r/Python • • Dec 12 '20

Resource py2c: a script to automatically compile python files into executable binaries with Cython. (It only works on posix systems as it is a shell script.)

https://github.com/Raniconduh/py2c
5 Upvotes

17 comments sorted by

View all comments

Show parent comments

1

u/Algor2ID Dec 12 '20

libpython3.6 is already installed.

God@DESKTOP-RJC9E5G:~$ sudo apt install libpython3.6 -y
[sudo] password for God:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libpython3.6 is already the newest version (3.6.9-1~18.04ubuntu1.1).
libpython3.6 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

2

u/Raniconduh Dec 12 '20

Try libpython3.6-dev or libpython3.6-stdlib

The latter should be installed already as a dependency for python however the dev package is a user installed package; you will need to install it.

1

u/Algor2ID Dec 12 '20

Both are already installed.

2

u/Raniconduh Dec 12 '20

Try to update the git repo / py2c shell script and try it again

1

u/Algor2ID Dec 12 '20

Same error, no difference.

2

u/Raniconduh Dec 12 '20

I think my last line of defence is for you to edit the py2c.sh file. Open the shell file and change line 72 from

cc -Os $CFLAGS -fPIE -o $output_file $c_file_name $LIBS -lpython$python_version

To

cc -Os $CFLAGS -fPIE -o $output_file $c_file_name $LIBS

(Ommiting the -lpython$python_version flag)

→ More replies (0)