mysqldb _mysql version trouble - python

Hi I developped a plugin for qgis in Python 2.5 under linux, now I am trying to port it in Windows; when qgis load the plugin it raises this error:
ImportError: this is MySQLdb version(1,2,3,'gamma',1) but _mysql is version (1,2,3,'final',0)
What should I do now? thanks in advance

Related

Mysql Connector issue in Python

I have installed MySQL connector for python 3.6 in centos 7
If I search for installed modules with below command
it's showing as below
pip3.6 freeze
mysql-connector==2.1.6
mysql-connector-python==2.1.7
pymongo==3.6.1
pip3.6 search mysql-connector
mysql-connector-python (8.0.6) -MYSQL driver written in Python
INSTALLED: 2.1.7
LATEST: 8.0.6
mysql-connector (2.1.6) - MySQL driver written in Python
INSTALLED: 2.1.6 (latest)
MySQL connector installed.But when trying to run the program using MySQL connector then its showing error no module installed MySQL connector.I am using MariaDB 10.0
python3.6 mysql1.py
Traceback (most recent call last):
File "mysql1.py", line 2, in
import mysql.connector as mariadb
File "/root/Python_environment/my_Scripts/mysql.py", line 2, in
import mysql.connector
ModuleNotFoundError: No module named 'mysql.connector'; 'mysql' is not a package
can any one know how to resolve
You must not name your script mysql.py — in that case Python tries to import mysql from the script — and fails.
Rename your script /root/Python_environment/my_Scripts/mysql.py to something else.
This is the problem I faced in Environment created by python.Outside the python environment i am able to run the script.Its running succefully.In python environment i am not able run script i am working on it.if any body know can give suggestion on this

Does the python 3.5 version of cx_Oracle work?

I'm using an Oracle 11g database, and 32bit windows python 3.5. I installed win32 cx_Oracle package using pip, but I am unable to import cx_Oracle. I got the error:
ImportError: DLL load failed. The specified procedure could not be found.

Installing MySQLDB on Python 2.7.3 under CentOS

I need to install Python 2.7 on a machine, from source, alongside the existing version on the machine (2.4). I have compiled and installed Python successfully, but when I try to run a script calling the MySQLDB module, it throws the following error:
[root#the-node1 bin]# interactive_recording_archive.py
Traceback (most recent call last):
File "/usr/local/bin/interactive_recording_archive.py", line 8, in <module>
import MySQLdb as mdb
ImportError: No module named MySQLdb
I have tried installing MySQLDB using the easy-install script but this fails to find any module by that name. I have MySQL installed and working on the machine.
What am I doing wrong?
The package is called MySQL-python:
easy_install MySQL-python
Do check the installation requirements; you have python and setuptools, but you need the mysql-devel package too.

pyodbc - ImportError: DLL load failed:

I am running 64-bit Windows 7 and the Python 2.6 installation (64-bit version).
In addition I am using Aptana Studio 3 to run python.
I just downloaded and installed the pyodbc-3.0.2.win32-py2.6 package.
When I run python and try
import pyodbc
I receive the following error: 'ImportError: DLL load failed: The specified procedure could not be found.'
any idea how do I make it work?
I fix the problem by installing pyodbc-2.1.11.win32-py2.6 from here
Try the installer for the 64bit version of pyodbc:
http://code.google.com/p/pyodbc/downloads/detail?name=pyodbc-3.0.2.win-amd64-py2.6.exe&can=2&q=

ImportError : No module named _sqlite3 on GAE

While trying to start local Google App Engine (v1.3.8) Server on my Fedora 14 with Python 2.5 (installed from source) I get the importerror
ImportError: No module named _sqlite3
I have the following package installed - sqlite, sqlite-devel, python2.5, python2.7. I did some Google and it looks like this error comes when there is no C binding for sqlite. However, since I have both the sqlite and sqlite-devel installed C bindings should be present. I get this same error when I do
import sqlite3
on Python console. What possibly can I do to resolve this error?
Install sqlite-devel and rebuild Python.
This works equally on Ubuntu 10.10 using
$ sudo aptitude install sqlite3 libsqlite3-dev
and rebuilding Python.

Categories