Ich möchte django mit MySQL und Python 3 ausführen. Ich initialisierte virtuelle Umgebung mit virtualenv --no-site-packages -p python3 ./
. Dann installierte ich django und Rad pip verwenden, so pip Frost gibtKann nicht installiert werden mysqlclient in python3 virtualenv
django==1.8.3
wheel==0.24.0
Dann habe ich versucht mysqlclient mit pip install mysqlclient
installieren, aber es endete mit
Downloading/unpacking mysqlclient
Downloading mysqlclient-1.3.6.tar.gz (78kB): 78kB downloaded
Running setup.py (path:/tmp/pip-build-jpdlrnc8/mysqlclient/setup.py) egg_info for package mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient
building '_mysql' extension
i586-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,3,6,'final',1) -D__version__=1.3.6 -I/usr/include/mysql -I/usr/include/python3.4m -I/home/ondra/zelvovani/include/python3.4m -c _mysql.c -o build/temp.linux-i686-3.4/_mysql.o -DBIG_JOINS=1 -fno-strict-aliasing -DTAOCRYPT_DISABLE_X86ASM -g -DNDEBUG
error: command 'i586-linux-gnu-gcc' failed with exit status 1
Complete output from command /home/ondra/zelvovani/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-jpdlrnc8/mysqlclient/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-fa_6nkh3-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ondra/zelvovani/include/site/python3.4:
running install
running build
running build_py
creating build
creating build/lib.linux-i686-3.4
copying _mysql_exceptions.py -> build/lib.linux-i686-3.4
creating build/lib.linux-i686-3.4/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-i686-3.4/MySQLdb
copying MySQLdb/compat.py -> build/lib.linux-i686-3.4/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-i686-3.4/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-i686-3.4/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-i686-3.4/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-i686-3.4/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-i686-3.4/MySQLdb
creating build/lib.linux-i686-3.4/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-i686-3.4/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-i686-3.4/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-i686-3.4/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-i686-3.4/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-i686-3.4/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-i686-3.4/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-i686-3.4/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-i686-3.4
i586-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -Dversion_info=(1,3,6,'final',1) -D__version__=1.3.6 -I/usr/include/mysql -I/usr/include/python3.4m -I/home/ondra/zelvovani/include/python3.4m -c _mysql.c -o build/temp.linux-i686-3.4/_mysql.o -DBIG_JOINS=1 -fno-strict-aliasing -DTAOCRYPT_DISABLE_X86ASM -g -DNDEBUG
error: command 'i586-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /home/ondra/zelvovani/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip-build-jpdlrnc8/mysqlclient/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-fa_6nkh3-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ondra/zelvovani/include/site/python3.4 failed with error code 1 in /tmp/pip-build-jpdlrnc8/mysqlclient
Storing debug log for failure in /home/ondra/.pip/pip.log
habe ich installiert libmysqlclient-dev
, python3-dev
, zlib1g-dev
(Pakete, die wurden in anderen Fragen hier im stackoverflow vorgeschlagen).
Haben Sie irgendwelche Ideen, was mache ich falsch?
Danke, es funktioniert. Aber ich würde gerne wissen, wie ich es lösen kann - auf der anderen Seite konnte ich mysqlclient installieren und beide Computer haben den selben debian und ich konnte keine verbundenen Pakete finden, in denen sie sich unterscheiden würden –