2017-08-06 1 views
0

ich eine virtuelle Umgebung erstellt haben, mit Python 3 und installiert django
ich mysqlclient installieren kann nicht, sagt es Problem mit setup.pyInstallation von MySQL-Client in django virtuellen Umgebung

[email protected]:~$ source env/bin/activate 
(env) [email protected]:~$ pip install mysqlclient 
Collecting mysqlclient 
     Using cached mysqlclient-1.3.10.tar.gz 
     Complete output from command python setup.py egg_info: 
     /bin/sh: 1: mysql_config: not found 
     Traceback (most recent call last): 
      File "<string>", line 1, in <module> 
      File "/tmp/pip-build-4pbezvx6/mysqlclient/setup.py", line 17, in <module> 
      metadata, options = get_config() 
      File "/tmp/pip-build-4pbezvx6/mysqlclient/setup_posix.py", line 44, in get_config 
      libs = mysql_config("libs_r") 
      File "/tmp/pip-build-4pbezvx6/mysqlclient/setup_posix.py", line 26, in mysql_config 
      raise EnvironmentError("%s not found" % (mysql_config.path,)) 
     OSError: mysql_config not found 
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-4pbezvx6/mysqlclient/ 
+0

Laden Sie diese Datei 'mysqlclient-1.3.10.tar.gz' herunter, extrahieren Sie und führen Sie' setup.py' aus. –

+0

Oder versuchen Sie diese 'sudo apt-get-Installation python3-mysqlclient' –

Antwort

1

auf Ubuntu Sie die Installation müssen Paket:

sudo apt-get install libmysqlclient-dev 
Verwandte Themen