2016-05-13 14 views
0

ich habe kubuntu 15.10 mit python2.7 und python 3.4m installiert wenn ich cxfreeze mit sudo installieren apt-get cx_freeze es ist ohne probleme installiert aber das problem ist, wenn ich kompilieren meine python-module die sind kompiliert für python2.7 Also nicht 3 python i cx_freeze von der Quelle zu bauen versuchen und ich diesen Fehler bin vor, wenn ich sudo python3 setup.py buildinstalliere cx_freeze auf ubuntu

hier ist der Fehler

adding base module named weakref 
running build 
running build_py 
running build_ext 
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict 
prototypes -g -fstack-protector-strong -Wformat -Werror=format 
security -D_FORTIFY_SOURCE=2 -fPIC -Ibuild/temp.linux-x86_64-3.4 
I/usr/include/python3.4m -c source/bases/Console.c -o 
build/temp.linux-x86_64-3.4/source/bases/Console.o 
x86_64-linux-gnu-gcc -pthread build/temp.linux-x86_64 
3.4/source/bases/Console.o -L/usr/lib/python3.4/config-3.4m-x86_64 
linux-gnu -lpython3.4 -o build/lib.linux-x86_64 
3.4/cx_Freeze/bases/Console -Xlinker -export-dynamic -Wl,-O1 -Wl, 
Bsymbolic-functions -lpthread -ldl -lutil -lm -lrt -lexpat -L/usr/lib 
-lz -lexpat -s 
/usr/bin/ld: cannot find -lz 
collect2: error: ld returned 1 exit status 
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1' 
+0

Das ziemlich gebrochen aussieht. Hast du versucht, stattdessen die Python 3-Version von cx_freeze mit 'pip' zu installieren? –

+0

Normalerweise vermeide ich die Verwendung von apt-get install mit Python-Paketen, weil die Versionen, die vom debian/ubuntu repo installiert werden, manchmal viel älter sind als die neuesten von pypi. –

+1

Wurde das Paket 'zlib1g-dev' installiert? –

Antwort

0

ich hatte genau die same problem laufen. Wie in this Antwort vorgeschlagen müssen Sie sich um die Abhängigkeiten installieren:

pip3 install zlib1g-dev 

Dann sudo python3 setup.py build

Verwandte Themen