Reputation: 2123
Here's my situation. I'm trying to package a game for Linux (on Ubuntu 13.04) written in Python 3.3 via cx_Freeze
. Fine. I installed it via sudo apt-get install cx-freeze
. Even though it installed, it didn't show up. So it's the Python 2 version. Fine. I then downloaded the source code from the website and tried to compile it with python3 ./setup.py build
. This is where things fall apart. I get this error from the compiler:
/usr/bin/ld: cannot find -lpython3.3
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
I'm using Python 3.3.2, which I compiled from source. Any tips?
Upvotes: 2
Views: 1137
Reputation: 40330
Reposting as an answer:
In general, I'd recommend using the Python packages from your distribution, which are already compiled in a way that cx_Freeze can work with. In Ubuntu, you can install python3
and python3-dev
.
If you need to compile your own Python interpreter, then you'll need to compile it with a shared library, like this:
./configure --enable-shared
There are more instructions on compiling in the CPython devguide.
Upvotes: 1