importerror

Python: ImportError no module named mysql.connector

本小妞迷上赌 提交于 2020-01-30 08:11:07
问题 I just created an exe from python script and when I tried to run it, it did not show up. Then, I tried to run it from cmd and I got ImportError below: Traceback (most recent call last): File "tkintertest2.py", line 17, in <module> File "Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module File "MySQL.py", line 1, in <module> ImportError: No module named mysql.connector Failed to execute script tkintertest2 How to solve this? I have installed mysql.connector

Import image in python

一曲冷凌霜 提交于 2020-01-24 10:22:40
问题 hello I am a beginner in python and I have problems executing my code . how can i fix this error with python: import cgitb cgitb.enable() print('Content-type: text/html\r\n') print('\r\n') import Image, ImageDraw import sys import math, random from itertools import product from ufarray import * ModuleNotFoundError: No module named 'Image' args = ("No module named 'Image'",) msg = "No module named 'Image'" name = 'Image' path = None with_traceback = <built-in method with_traceback of

ImportError: No module named '_tkinter', please install the python3-tk package

若如初见. 提交于 2020-01-22 17:48:32
问题 I've already gone through all the similar questions in this regard and tried the solutions proposed there. But I'm unable to get this error sorted out though my python3-tk package is installed in the proper virtualenv that I'm using for my project. Though in my project, I don't use tkinter, when i try to run the file, I'm getting the following error related to the _tkinter module. Traceback (most recent call last): File "/usr/lib/python3.5/tkinter/ init .py", line 36, in import _tkinter

Can't import sun.org.mozilla.javascript.internal in NetBeans

风流意气都作罢 提交于 2020-01-21 05:27:05
问题 In my java program I make heavy use of Suns implmentation of the Rhino script engine. Very recently however, my JDK does not seem to automatically import the rt.jar file anymore when compiling. Whats strange is that NetBeans reports 0 live errors, they only show up when doing a complete Clean & Build. This wasn't happening before when I was importing NativeArray, so I'm really confused on why it all of a sudden stopped working. Specs: OS - Windows Java version - java version "1.6.0_20" Javac

How to catch an ImportError non-recursively? (dynamic import)

空扰寡人 提交于 2020-01-17 04:23:30
问题 Say we want to import a script dynamically, i.e. the name is constructed at runtime. I use this to detect plugin scripts for some program, so the script may not be there and the import may fail. from importlib import import_module # ... subpackage_name = 'some' + dynamic() + 'string' try: subpackage = import_module(subpackage_name) except ImportError: print('No script found') How can we make sure to only catch the possible import failure of the plugin script itself, and not of the imports

How to integrate the sentiment analysis script with the chatbot for analysing the user's reply in the same console screen?

给你一囗甜甜゛ 提交于 2020-01-16 08:19:31
问题 I want to make a chatbot that uses Sentiment analyser script for knowing the sentiment of the user's reply for which I have completed the Chatbot making. Now only thing I want to do is to use this Script to analyse the reply of user using the chatbot that I have made. How should I integrate this sentiment_analysis.py script with the chatbot.py file to analyse the sentiment's of user? Update: The overall performance will be like this : Chatbot: How was your day? User: It was an awesome day. I

ImportError: No module named textract

╄→гoц情女王★ 提交于 2020-01-15 09:20:39
问题 I have installed textract using pip install and ran the import command in jupyter notebook which is throwing the following error. I am on a windows machine and have two versions of python installed(2.7 and 3.6) using conda. I have also added the paths to environment variables as suggested in other posts but still getting the error. import textract ImportErrorTraceback (most recent call last) <ipython-input-2-99b3b0e1733d> in <module>() 1 #Code to extract pdf files ----> 2 import textract 3

Import cv2 error python

亡梦爱人 提交于 2020-01-15 07:11:29
问题 Whenever I attempt to import cv2, I always get this error import cv2 Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: /usr/lib/libgdal.so.1: undefined symbol: sqlite3_column_table_name I've already created a symbolic link and I have also already installed the libgdal-dev module from the Ubuntu Software Center. Any ideas? Thanks! EDIT : I did as pbu suggested, and the link was created without fail for the most part. But now, this error comes up: import cv2

Python Module Importing Issues

天大地大妈咪最大 提交于 2020-01-13 16:55:29
问题 I run Windows 7, and I can import built-in modules, but when I save my own script and try to import it in IDLE, I get an error saying that the module doesn't exist. I use the Python text editor found by clicking "File" and "New Window" from the Python Shell. I save it as a .py file within a Module folder I created within the Python directory. However, whenever i type import module_name in IDLE, it says that the module doesn't exist. What am I doing wrong, or not doing? I've tried import

Python Module Importing Issues

只谈情不闲聊 提交于 2020-01-13 16:55:11
问题 I run Windows 7, and I can import built-in modules, but when I save my own script and try to import it in IDLE, I get an error saying that the module doesn't exist. I use the Python text editor found by clicking "File" and "New Window" from the Python Shell. I save it as a .py file within a Module folder I created within the Python directory. However, whenever i type import module_name in IDLE, it says that the module doesn't exist. What am I doing wrong, or not doing? I've tried import