Profilo di Donald96

Nome Donald96
Indirizzo email n/a
Messaggi4
  • Re: Problema Comando pip install MySQL-Python
    Forum >> Principianti
    Ho provato a far come mi hai detto ma ancora niente, quando apro l'idle e lancio il mio programma mi esce il seguente errore:




    Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32

    Type "help", "copyright", "credits" or "license()" for more information.

    >>>

    === RESTART: C:\Users\Donald\Desktop\script1.py ==

    Traceback (most recent call last):

    File "C:\Users\Donald\Desktop\script1.py", line 2, in <module>

    import MySQL

    ModuleNotFoundError: No module named 'MySQL'

    >>>





    Seconda te cosa potrei fare?
  • Re: Problema Comando pip install MySQL-Python
    Forum >> Principianti
    Ho notato che è obsoleto infatti non me lo fa installare ne tramite .exe ne tramite comando dal CMD, mi esce ancora questo errore:




    C:\Windows\system32>pip install MySQL-Python

    Collecting MySQL-Python

    Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68deb

    e7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip

    Installing collected packages: MySQL-Python

    Running setup.py install for MySQL-Python ... error

    ERROR: Command errored out with exit status 1:

    command: 'c:\program files (x86)\python38-32\python.exe' -u -c 'import sys,

    setuptools, tokenize; sys.argv0 = '"'"'C:\\Users\\Donald\AppData\\Local\\Tem

    p\\pip-install-tg46jshn\MySQL-Python\\setup.py'"'"'; __file__='"'"'C:\\Users\\D

    onald\AppData\\Local\\Temp\\pip-install-tg46jshn\MySQL-Python\\setup.py'"'"';f

    =getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r

    \n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))'

    install --record 'C:\Users\DonaldAppData\Local\Temp\pip-record-phsehy7l\install

    -record.txt' --single-version-externally-managed --compile

    cwd: C:\Users\DonaldAppData\Local\Temp\pip-install-tg46jshnMySQL-Pyth

    on\

    Complete output (29 lines):

    running install

    running build

    running build_py

    creating build

    creating build\lib.win32-3.8

    copying _mysql_exceptions.py -> build\lib.win32-3.8

    creating build\lib.win32-3.8MySQLdb

    copying MySQLdb\__init__.py -> build\lib.win32-3.8MySQLdb

    copying MySQLdb\converters.py -> build\lib.win32-3.8MySQLdb

    copying MySQLdb\connections.py -> build\lib.win32-3.8MySQLdb

    copying MySQLdb\cursors.py -> build\lib.win32-3.8MySQLdb

    copying MySQLdb\release.py -> build\lib.win32-3.8MySQLdb

    copying MySQLdb\times.py -> build\lib.win32-3.8MySQLdb

    creating build\lib.win32-3.8MySQLdb\constants

    copying MySQLdb\constants\__init__.py -> build\lib.win32-3.8MySQLdb\constan

    ts

    copying MySQLdb\constants\CR.py -> build\lib.win32-3.8MySQLdb\constants

    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.8MySQLdb\const

    ants

    copying MySQLdb\constants\ER.py -> build\lib.win32-3.8MySQLdb\constants

    copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.8MySQLdb\constants

    copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.8MySQLdb\constant

    s

    copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.8MySQLdb\constants




    running build_ext

    building '_mysql' extension

    creating build\temp.win32-3.8

    creating build\temp.win32-3.8\Release

    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo

    /Ox /W3 /GL /DNDEBUG /MD -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 "

    -IC:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\include" "-Ic:\program fi

    les (x86)\python38-32\include" "-Ic:\program files (x86)\python38-32\include" "-

    IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program F

    iles (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\

    Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\incl

    ude\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tc_mysql.c /F

    obuild\temp.win32-3.8\Release\_mysql.obj /Zl

    _mysql.c

    _mysql.c(42): fatal error C1083: Cannot open include file: 'config-win.h': N

    o such file or directory

    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\B

    IN\\cl.exe' failed with exit status 2

    ----------------------------------------

    ERROR: Command errored out with exit status 1: 'c:\program files (x86)\python38-

    32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv0 = '"'"'C:\\U

    sers\\Donald\AppData\\Local\\Temp\\pip-install-tg46jshn\MySQL-Python\\setup.py

    '"'"'; __file__='"'"'C:\\Users\\Donald\AppData\\Local\\Temp\\pip-install-tg46js

    hn\MySQL-Python\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file

    __);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(c

    ode, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\DonaldAppData\Local

    \Temp\pip-record-phsehy7l\install-record.txt' --single-version-externally-manage

    d --compile Check the logs for full command output.

    WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.

    You should consider upgrading via the 'python -m pip install --upgrade pip' comm

    and.




    Quindi secondo te l'unica è Python 3.8 e Connector?





    Lo so purtroppo è uno script vecchio ma mi serve per poter andar avanti in un progetto, se no potrei sostituire nel codice mysql con apache2? o no?
  • Re: Problema Comando pip install MySQL-Python
    Forum >> Principianti
    Ok perfetto, ti ringrazio.
    Provo a installare python 3.8 ed quel file per MySQL.

    Io devo avviare uno script di Python e sto cercando di creare l'ambiente, e mi richiede MySQL per quello lo stavo cercando.

    Comunque era una guida che ho trovato su Google, conosco altri linguaggio ma Python sono nuovo.

    Ti ringrazio nel frattempo e ti faccio sapere.




    Quindi installo Python 3.8 e poi il DB Mysql?
  • Problema Comando pip install MySQL-Python
    Forum >> Principianti
    Ciao a tutti, :)



    Sono nuovo del forum e del linguaggio Python.




    Stavo cominciando a provare qualche script per provare Python, ma mi son bloccato praticamente all'inizio quando provavo ad installare dal CMD con i privilegi amministratore il database di MySQL per Python.




    Sotto ho allegato una foto con l'errore che mi esce, se qualcuno di voi riuscisse ad aiuarmi ne sarei molto grato.




    Io ho installato Python 2.7