Jump to content

importError: no module named _mysql

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
ryanszeto

ryanszeto

    Newbie

  • Members
  • Pip
  • 9 posts
Hi guys.

I am writing a Jython script in which I have to import a MySQL.py file. When I run the files, it said "ImportError: no module named _mysql".

I checked on the internet and searched for the _mysql.py files but I never find it.

I am exhausted and need you guys help!

Ryan

#2
CygnetGames

CygnetGames

    Programmer

  • Members
  • PipPipPipPip
  • 119 posts
Is this what you want?

SourceForge.net: MySQL for Python

#3
Victor

Victor

    Programmer

  • Members
  • PipPipPipPip
  • 116 posts

ryanszeto said:

Hi guys.

I am writing a Jython script in which I have to import a MySQL.py file. When I run the files, it said "ImportError: no module named _mysql".

I checked on the internet and searched for the _mysql.py files but I never find it.

I am exhausted and need you guys help!

Ryan

I think I know what you're trying to do. My guess is that you didn't install _mysql properly or maybe just to the wrong place. Else, if you're trying to run a file (I think that's what your trying to do), try:
import os

os.startfile('myfile.py')
Hope that helps, if not what you were asking for, sorry lol, let me know