importerror

Import Error in zope.interface.registry in python

喜夏-厌秋 提交于 2019-12-10 14:47:42
问题 I am installing a project in virtual environment. I am getting error from zope.interface.registry import Components Traceback (most recent call last): File "<console>", line 1, in <module> ImportError: No module named registry Version of this module as 4.0.5 >>> import pkg_resources >>> pkg_resources.get_distribution("zope.interface").version '4.0.5' I tried the same on my machine (not virtual env), >>> import pkg_resources >>> pkg_resources.get_distribution("zope.interface").version '4.0.1'

ImportError: No module named 'Crypto'

℡╲_俬逩灬. 提交于 2019-12-10 14:11:18
问题 I am working with pycrypto. It works fine on my local windows machine, but when I move it to my python box I get an error with importing the module: from Crypto.Cipher import ARC4 ImportError: No module named 'Crypto' The output of python3.3 -c "from Crypto.Cipher import ARC4" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named 'Crypto' output of pip3 list has a reference includes pycrypto (2.6.1) I know it works with Python 2.7.6, but I wrote

ImportError: cannot import name check_array from sklearn.utils.validation

馋奶兔 提交于 2019-12-10 12:42:37
问题 When I import the function check_array from module sklearn.utils.validation , it got an Import Error ( ImportError: cannot import name check_array ). The tab completion got check_arrays , but I'm wondering there only exists a function called check_array in validation.py ( source code on Github). Besides, the spectral clustering algorithm implemented in scikit-learn/sklearn/cluster/spectral.py also used from ..utils.validation import check_array , not check_arrays . I'm quite confused about

Numpy install under Ubuntu (12.04) causes Python ImportError

天涯浪子 提交于 2019-12-10 11:45:26
问题 Under Ubuntu (12.04), installed python (2.7.5) with numpy (1.8rc2) using openblas into own environment (/din). The numpy site.cfg file is configured to point to openblas, and compiled as: $ python setup.py build $ sudo python setup.py install --prefix=/home/Programs/din/local $ python Python 2.7.5 (default, Oct 24 2013, 15:33:08) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy Traceback (most recent call last): File "<stdin>", line

Trouble importing filters using skimage

假如想象 提交于 2019-12-10 10:56:32
问题 I have been using the Skimage package for quite a while in Python 2.7. Recently I upgrade my Ubuntu to 14.10 And now I can not import filters (used to be filter) from the Skimage package. Python 2.7.9 (default, Apr 2 2015, 15:33:21) [GCC 4.9.2] on linux2 Type "copyright", "credits" or "license()" for more information. >>> from skimage import filters Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> from skimage import filters File "/usr/local/lib/python2.7/dist

Running scrapy from script (beginner)

混江龙づ霸主 提交于 2019-12-10 10:36:54
问题 I am starting to get into python and yes, I have searched this site and the web for an answer, but somehow I really can't get it to run. I've created a spiderclass EbaySpider, residing in spider/ebay.py that I can start from the command line without problems (even with output to a JSON file). Now I want to start scrapy from within another .py file, so I can directly access the crawled data and output it to a GUI (will think about how to do that later). I have taken the code from this question

Python/Cython trouble importing files and methods

孤街浪徒 提交于 2019-12-10 10:23:34
问题 There are 2 issues both relating to importing that may or may not be cython related? I have the following simplified files to recreate the problem. All files are in the same directory. The .pyx files have successfully compiled into *.so , *.pyc and *.c files. setup.py: from distutils.core import setup from Cython.Build import cythonize setup( ext_modules=cythonize("*.pyx"), ) cy1.pyx: (cython) cdef int timestwo(int x): return x * 2 cy1.pxd: cdef int timestwo(int x) cy3.py: (normal python) def

ImportError: No Module named 'mt_exceptions' when using Mingus library

泪湿孤枕 提交于 2019-12-10 09:54:42
问题 Forgive my ignorance in advance, I am very new to python. I am trying to use a python 3 version (https://code.google.com/r/artdent-mingus-python3/) of the Mingus library (https://pypi.python.org/pypi/mingus/) in 3.4.2. When trying to use the note module, I keep getting the ImportError listed in the title. Based on my research on similar ImportError questions, I have tried the following things: -I made sure there was a mt_exceptions.py file in the relevant directory -I made sure each mingus

Importing modules from a sibling directory for use with py.test

只愿长相守 提交于 2019-12-10 09:23:11
问题 I am having problems importing anything into my testing files that I intend to run with py.test. I have a project structure as follows: /ProjectName | |-- /Title | |-- file1.py | |-- file2.py | |-- file3.py | |-- __init__.py | |-- /test | |-- test_file1.py I have not been able to get any import statements working with pytest inside the test_file1.py file, and so am currently just attempting to use a variable declared in file_1.py and print it out when test_file1.py is run. file1.py contains:

ImportError: No module named visual

佐手、 提交于 2019-12-10 03:49:00
问题 I am trying to run this Python Program on Ubuntu but I am getting an error that says ImportError: No module named visual Can you guys please guide me on how can I resolve this issue? 回答1: visual module has been renamed to vpython lately. So to run this now, you first install vpython like: sudo pip3 install vpython then replace the line: from visual import * with from vpython import * That worked for me. 回答2: The script requires Vpython to be installed. Then, make sure it is actually installed