2014-04-24 7 views
2

모듈을 찾을 수 없습니다, 그것은 "설치가 성공적으로 완료"라는 다른 설치 또는 진단을 제공하지 않습니다.MySQL의 커넥터/파이썬에 .dmg 설치가 "성공"하지만 난</p> <p>내가 그것을 실행 OSX <a href="http://dev.mysql.com/downloads/connector/python/" rel="nofollow">http://dev.mysql.com/downloads/connector/python/</a>에 대한 MySQL의 커넥터/파이썬 1.1.6 .dmg를 다운로드

하지만 성공적인 설치를 확인하려고 할 때 http://dev.mysql.com/doc/connector-python/en/connector-python-verification.html

vt102:~ xxxxx$ python 

Python 2.7.6 |Anaconda 1.9.2 (x86_64)| (default, Jan 10 2014, 11:23:15) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 

>>> import mysql.connector 

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
ImportError: No module named mysql.connector 

모든 지금까지/파이썬 승 쉽게 작동 된 모듈을 찾을 수 없다고하지만,이 mysql을/파이썬 물건이었다 악몽. 어떤 충고? // UPDATE

은 내가 INSTALL.LOG을 발견하고 설치에서 단서를 검색,하지만 난 유용한 아무 것도 나타나지 않거나 의심스러운

Apr 24 08:45:02 vt102.local Installer[8474]: MySQL database driver written in pure Python Installation Log 
Apr 24 08:45:02 vt102.local Installer[8474]: Opened from: /Volumes/mysql-connector-python-1.1.6/mysql-connector-python-1.1.6.pkg 
Apr 24 08:45:02 vt102.local Installer[8474]: fileURLForURL = x-disc://mysql-connector-python-1.1.6/mysql-connector-python-1.1.6.pkg 
Apr 24 08:45:02 vt102.local Installer[8474]: fileURLForURL = file://localhost/Volumes/mysql-connector-python-1.1.6/mysql-connector-python-1.1.6.pkg 
Apr 24 08:45:46 vt102.local Installer[8474]: Upgrade: "MySQL database driver written in pure Python" 
Apr 24 08:45:46 vt102.local Installer[8474]:  mysql-connector-python-1.1.6.pkg : com.oracle.mysql.connector.python : 1.1.6.1.1 
Apr 24 08:45:46 vt102.local Installer[8474]: -[IFDInstallController(Private) _buildInstallPlan]: file://localhost/Volumes/mysql-connector-python-1.1.6/mysql-connector-python-1.1.6.pkg 
     "PKJaguarPackage <file://localhost/Volumes/mysql-connector-python-1.1.6/mysql-connector-python-1.1.6.pkg>" 
Apr 24 08:45:46 vt102.local installd[413]: PackageKit: Will do receipt-based obsoleting for package identifier com.oracle.mysql.connector.python (prefix path=) 
Apr 24 08:45:46 vt102.local installd[413]: PackageKit: Extracting file://localhost/Volumes/mysql-connector-python-1.1.6/mysql-connector-python-1.1.6.pkg (destination=/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/C/PKInstallSandboxManager/0992398D-F177-487C-8A6F-7A43E760ED1B.activeSandbox/Root, uid=0) 
Apr 24 08:45:47 vt102.local installd[413]: PackageKit: Writing receipt for com.oracle.mysql.connector.python to /private/var/db/receipts 
Apr 24 08:45:47 vt102.local installd[413]: Installed "MySQL database driver written in pure Python"() 

답변

3

오라클은 당신이 선택하지 않습니다 설치 경로; 여기에 해결 방법이 있습니다 :

  1. 오라클에서 platform independent version을 다운로드하십시오.

  2. 폴더의 압축을 풀어 anaconda 디렉토리에 배치하십시오.

  3. 터미널을 열고 mysql 커넥터의 디렉토리로 이동하십시오.

  4. 유형 : python setup.py install