ImportError: No module named mxTidy - python

I have installed egenix_mx_experimental-3.0.0-py2.7.But when I run the program, the error occured.
Traceback (most recent call last):
File "E:/python/pyCharm/131113.py", line 21, in <module>
from mx import Tidy
File "C:\Python27\lib\site-packages\mx\Tidy\__init__.py", line 7, in <module>
from Tidy import *
File "C:\Python27\lib\site-packages\mx\Tidy\Tidy.py", line 7, in <module>
from mxTidy import *
ImportError: No module named mxTidy
I don't know what I am missing.
Please help.
Thanks.

Are you sure that it's installed? Since you're working on Windows, one way to check is to see if there's a folder named "mxTidy" in any of your Python path:
from sys import path
Then run a code to check in the listed path and all its subdirectories, if any, if there's the "mxTidy" folder in there.
When you sort this issue then you can get back to inform us what the result was and then we'll know what to do next.

Related

Python can't find time module after I moved my application to different folder

I have a strange problem after I moved an application to a different folder. I copied all files inside the old folder to the new directory and then tried to restart the application. However when I do so I get the error message:
Traceback (most recent call last):
File "bin/zeoserver", line 24, in <module>
import plone.recipe.zeoserver.ctl
File "/usr/local/Plone/buildout-cache/eggs/plone.recipe.zeoserver-1.3.1-py2.7.egg/plone/recipe/zeoserver/__init__.py", line 1, in <module>
import logging
File "/usr/local/Plone/Python-2.7/lib/python2.7/logging/__init__.py", line 26, in <module>
import sys, os, time, cStringIO, traceback, warnings, weakref, collections
ImportError: No module named time
This is particularly intriguing as time should be a pre-installed Python package. What is also interesting is that after renaming the old folder to xyz_old I cannot start the application from there either.
What could cause such an issue?

Error while importing localization

I downloaded the localization package in Anaconda. But when I try to import it I get the following error:
Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import localization File "~\Python\Python36-32\lib\site-packages\localization\__init__.py", line 1, in <module>
from geoProject import *
ModuleNotFoundError: No module named 'geoProject'
I do not know what to do, can someone please help me out?
"geoProject", must be your project name, not the name of the module you are trying to input.
Try:
from your module import *
or just
import yourmodule
It works if your module is in current directory. Unless you should write the full path to your module

How to add python library to Spyder

I am trying to add an external python library from a third party software into Spyder so I can work with it. I have already tried the following:
Adding library path containing .py files to Tools>PYTHONPATH manager
Synchronizing the path
Updating module names list through Tools>Update Module names list
However, when I try to import modules from this library I get two types of errors:
import easy
Traceback (most recent call last):
File "<ipython-input-2-685519d35f15>", line 1, in <module>
import easy
File "C:\Program Files (x86)\Plaxis\PLAXIS 2D\plxscripting\easy.py", line 24, in <module>
from .server import Server, InputProcessor
ValueError: Attempted relative import in non-package
The second type of error as follows:
from plxscripting.easy import *
Traceback (most recent call last):
File "<ipython-input-1-a40c101d3bb0>", line 1, in <module>
from plxscripting.easy import *
ImportError: No module named plxscripting.easy
I don't understand why Spyder is not recognizing these libraries. The path has been added and shows up on the manager. What constitutes a python module? Is it not just the .py file with module name prefix? Is not the path sufficient to work with the library through the IDE?

Python error: No module named RuntimeError

Im trying to figured out this problem. Yesterday I installed PyScripter and since then, scripts doesnt work. When I run any script (in PyScripter or IDLE) and trying to "import arcpy", it gets this error:
import arcpy
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import arcpy
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\__init__.py", line 17, in <module>
from geoprocessing import gp
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\__init__.py", line 14, in <module>
from _base import *
File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 14, in <module>
import arcgisscripting
File "C:\Python26\ArcGIS10.0\lib\arcgisscripting.py", line 81, in <module>
from RuntimeError import RuntimeError
ImportError: No module named RuntimeError
Have somebody any suggestion how to fix it?
Thanks to all very much!
Sounds like the module is not installed properly (or at all). To verify, do the following:
open a shell and start the python shell by typing python
(If this doesn't display an error, check that python is added to your system path or if it is even installed at all. But if you've used Python on said machine maybe system path issue)
enter the commmand help('modules')
review the list of modules that's returned to see whether arcpy is included
if not, then you may have to reinstall the module

No module named weight_vector in sci with py2exe in windows

I get the following error message using Python v2.7.5 and scipy v0.12.0 with py2exe v0.6.9 on a 32 bit machine using 32 bit versions of the packages from Christoph Gohlke. If anyone can provide relevant and useful suggestions I would greatly appreciate it. Here is the error message:
Traceback (most recent call last):
File "MainWindow.py", line 13, in <module>
from svm.svm import SVM
File "svm\svm.pyc", line 4, in <module>
File "sklearn\svm\__init__.pyc", line 13, in <module>
File "sklearn\svm\classes.pyc", line 3, in <module>
File "sklearn\linear_model\__init__.pyc", line 20, in <module>
File "sklearn\linear_model\sgd_fast.pyc", line 12, in <module>
File "sklearn\linear_model\sgd_fast.pyc", line 10, in __load
File "weight_vector.pxd", line 14, in init sklearn.linear_model.sgd_fast
(sklearn\linear_model\sgd_fast.c:13206)
ImportError: No module named weight_vector
This is my setup.py file:
from distutils.core import setup
import py2exe
import sys
sys.path.append('../')
dcm = 'dcm.testDCM'
svm_path = 'svm.svm'
setup(windows=[{"script":"MainWindow.py"}],
options={"py2exe":{
"includes" : ["sip", dcm, svm_path,
'sklearn',
'scipy.sparse.csgraph._validation',
'sklearn.linear_model.sgd_fast.weight_vector']}})
Actually, I have solved the problem in this question scipy with py2exe problesm and solved it using the second answer in that question (the answer), adding the "scipy.sparse.csgraph._validation" in my includes options for the py2exe.
Then I want to do the similar thing for the error "No module named weight_vector", say, adding the "sklearn.linear_model.sgd_fast.weight_vector" in my includes options. However, it didn't work.
I check the directory "sklearn.linear_model.sgd_fast" only to find that the sgd_fast is a ".pyd" file rather than a .py file. Maybe this is why my methods cannot work.
I didn't get any idea about dealing with the pyd file. Have anybody met the similar problems or got any ideas? I really need your help.

Categories