2016-09-21 13 views
1

ちょっと私は5時間のMySQL-Pythonをインストールしようとしましたが、エラーが続いています。最初は「vcvarsall.batを見つけることができませんでした」と、視覚的なC++ 2010を必要とするものがあります。だから、私の問題のための "解決策"を見つけた... MySQL-Pythonをインストールするときに新しいエラーを受け取るだけです。windows-7にMySQL-pythonをインストールする

私はPythonでPython 3.4を使用しています。インストールはWindows 7でpipを使用しています。私はあなたがこのようにPATH環境変数にはPythonを追加したいとしている

> Collecting MySQL-python 
    Using cached MySQL-python-1.2.5.zip 
Building wheels for collected packages: MySQL-python 
    Running setup.py bdist_wheel for MySQL-python: started 
    Running setup.py bdist_wheel for MySQL-python: finished with status 'error' 
    Complete output from command C:\Python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\yuval\\AppData\\Local\\Temp\\pycharm-packaging0.tmp\\MySQL-python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\yuval\AppData\Local\Temp\tmp_8v3yxijpip-wheel- --python-tag cp34: 
    running bdist_wheel 
    running build 
    running build_py 
    creating build 
    creating build\lib.win32-3.4 
    copying _mysql_exceptions.py -> build\lib.win32-3.4 
    creating build\lib.win32-3.4\MySQLdb 
    copying MySQLdb\__init__.py -> build\lib.win32-3.4\MySQLdb 
    copying MySQLdb\converters.py -> build\lib.win32-3.4\MySQLdb 
    copying MySQLdb\connections.py -> build\lib.win32-3.4\MySQLdb 
    copying MySQLdb\cursors.py -> build\lib.win32-3.4\MySQLdb 
    copying MySQLdb\release.py -> build\lib.win32-3.4\MySQLdb 
    copying MySQLdb\times.py -> build\lib.win32-3.4\MySQLdb 
    creating build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\__init__.py -> build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\CR.py -> build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\ER.py -> build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.4\MySQLdb\constants 
    warning: build_py: byte-compiling is disabled, skipping. 

    running build_ext 
    building '_mysql' extension 
    creating build\temp.win32-3.4 
    creating build\temp.win32-3.4\Release 
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -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:\Python34\include -IC:\Python34\include /Tc_mysql.c /Fobuild\temp.win32-3.4\Release\_mysql.obj /Zl 
    _mysql.c 
    _mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory 
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2 

    ---------------------------------------- 
    Running setup.py clean for MySQL-python 
Failed to build MySQL-python 
Installing collected packages: MySQL-python 
    Running setup.py install for MySQL-python: started 
    Running setup.py install for MySQL-python: finished with status 'error' 
    Complete output from command C:\Python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\yuval\\AppData\\Local\\Temp\\pycharm-packaging0.tmp\\MySQL-python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\yuval\AppData\Local\Temp\pip-hqm_a4jr-record\install-record.txt --single-version-externally-managed --compile: 
    running install 
    running build 
    running build_py 
    creating build 
    creating build\lib.win32-3.4 
    copying _mysql_exceptions.py -> build\lib.win32-3.4 
    creating build\lib.win32-3.4\MySQLdb 
    copying MySQLdb\__init__.py -> build\lib.win32-3.4\MySQLdb 
    copying MySQLdb\converters.py -> build\lib.win32-3.4\MySQLdb 
    copying MySQLdb\connections.py -> build\lib.win32-3.4\MySQLdb 
    copying MySQLdb\cursors.py -> build\lib.win32-3.4\MySQLdb 
    copying MySQLdb\release.py -> build\lib.win32-3.4\MySQLdb 
    copying MySQLdb\times.py -> build\lib.win32-3.4\MySQLdb 
    creating build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\__init__.py -> build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\CR.py -> build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\ER.py -> build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.4\MySQLdb\constants 
    copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.4\MySQLdb\constants 
    warning: build_py: byte-compiling is disabled, skipping. 

    running build_ext 
    building '_mysql' extension 
    creating build\temp.win32-3.4 
    creating build\temp.win32-3.4\Release 
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -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:\Python34\include -IC:\Python34\include /Tc_mysql.c /Fobuild\temp.win32-3.4\Release\_mysql.obj /Zl 
    _mysql.c 
    _mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory 
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2 

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

    Failed building wheel for MySQL-python 
Command "C:\Python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\yuval\\AppData\\Local\\Temp\\pycharm-packaging0.tmp\\MySQL-python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\yuval\AppData\Local\Temp\pip-hqm_a4jr-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\yuval\AppData\Local\Temp\pycharm-packaging0.tmp\MySQL-python\ 

答えて

0

インストールピップとき

は、これは私が得るものです。そして、システム環境変数の下の「環境変数」

  • は、あなたが行っているというボタンをクリックし、「詳細設定」タブで

    1. マイコンピュータ
    2. システムのプロパティ
    3. システムの詳細設定
    4. :に行きます以下の変数を追加/変更したい:PYTHONPATHパス

    PYTHONPATH

    C:\Python27;C:\Python27\Lib\site-packages;C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk;C:\Python27\Scripts 
    

    パス

    C:\Program Files\MySQL\MySQL Utilities 1.3.5\;C:\Python27;C:\Python27\Lib\site-packages;C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk;C:\Python27\Scripts 
    

    あなたのパスの異なる場合がありますので、それらを調整してくださいが、この:ここに私の変数がどのように見えるかのペーストがあります設定は私のために働き、これらの変更を行った後にMySQLを実行できるはずです。

  • +0

    よくあること... まず、私のpython 3.4フォルダのLib \ lib-tkを見つけられません。 また、C:\ Program Files \ MySQL \ MySQL Utilities 1.3.5が見つかりました。コンピュータ... – Alex

    +0

    も私がでのpythonを持っているフォルダをpython34するために、すべてのpython27パスを変更し これは私のパスです:PYTHONPATHの場合 : C:\ Python34; C:\ Python34 \ Libの\サイト - パッケージC:\ Program Files \ MySQL \ MySQL Utilities 1.3.5 \; C:\ Python34 \ Lib; C:\ Python34 \ DLLs; C:\ Python34 \ Scripts パスの場合、 Python34; C:\ Python34 \ Lib \ siteパッケージ:C:\ Python34 \ Lib; C:\ Python34 \ DLL; C:\ Python34 \ Lib \ lib-tk; C:\ Python34 \ Scripts – Alex

    関連する問題