importerror

ImportError: No module named Cython.Distutils

一笑奈何 提交于 2019-12-17 22:34:48
问题 I'm having a strange problem while trying to install the Python library zenlib , using its setup.py file. When I run the setup.py file, I get an import error, saying ImportError: No module named Cython.Distutils` but I do have such a module, and I can import it on the python command line without any trouble. Why might I be getting this import error? I think that the problem may have to do with the fact that I am using Enthought Python Distribution, which I installed right beforehand, rather

Import Error. Circular References

大兔子大兔子 提交于 2019-12-17 20:15:46
问题 I have a package like this package/ __init__.py subpackage1/ __init__.py moduleA.py moduleB.py moduleC.py moduleD.py subpackage2/ __init__.py moduleX.py moduleY.py moduleZ.py In moduleB.py, I am importing from moduleA import bar In moduleA, I am importing from moduleB import foo I am getting ImportError. ImportError: cannot import name foo What could be the problem here ? and to avoid this problem, what should I do ? and what should I write in _ init _ .py pf package, subpackage1, subpackage2

Mac - Python - import error: “No module named site”

只谈情不闲聊 提交于 2019-12-17 19:42:53
问题 Tonight I am trying to get the package called "requests" installed and have begun fumbling around with the terminal and do not have very much intuition when it comes to this sort of thing. Computer is a mac mini, osx version 10.9.4 In /Library/Python I have 4 folders: 2.3 2.5 2.6 and 2.7. In /Applications I have "Python 2.7" and "Python 3.4" I can open IDLE and type 8+8 and I get 16 just fine. Here is the error I am getting in terminal: host-210-117:~ Mario$ python ImportError: No module

ImportError: cannot import name main when running pip --version command in windows7 32 bit

我是研究僧i 提交于 2019-12-17 05:31:05
问题 I've installed the latest python (2.7.9) bundled with pip and setuptools for windows 32-bit. I've tried reinstalling pip but the problem persists. Here's the error after running pip --version in Administrator cmd: Traceback (most recent call last): File "D:\Python\lib\runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "D:\Python\lib\runpy.py", line 72, in _run_code exec code in run_globals File "D:\Python\Scripts\pip.exe\__main__.py", line 5, in <module>

ImportError: No Module Named bs4 (BeautifulSoup)

寵の児 提交于 2019-12-17 04:55:28
问题 I'm working in Python and using Flask. When I run my main Python file on my computer, it works perfectly, but when I activate venv and run the Flask Python file in the terminal, it says that my main Python file has "No Module Named bs4." Any comments or advice is greatly appreciated. 回答1: Activate the virtualenv, and then install BeautifulSoup4: $ pip install BeautifulSoup4 When you installed bs4 with easy_install , you installed it system-wide. So your system python can import it, but not

ImportError: No Module Named bs4 (BeautifulSoup)

人走茶凉 提交于 2019-12-17 04:53:18
问题 I'm working in Python and using Flask. When I run my main Python file on my computer, it works perfectly, but when I activate venv and run the Flask Python file in the terminal, it says that my main Python file has "No Module Named bs4." Any comments or advice is greatly appreciated. 回答1: Activate the virtualenv, and then install BeautifulSoup4: $ pip install BeautifulSoup4 When you installed bs4 with easy_install , you installed it system-wide. So your system python can import it, but not

Django error for psycopg2 ImportError: DLL load failed

删除回忆录丶 提交于 2019-12-14 03:45:39
问题 Hi I am getting this error while I am trying to run syncdb in my virtual environment. If I copy psycopg2 folder to my project folder (where I have my manage.py and settings.py ) then this error disappears. But I still get this error when the code is pushed to heroku. I have referred to many online materials but wasn't very lucky. File "c:\Users\mayayadav\anteus\venv\lib\site-packages\psycopg2-2.4.5-py2.7-wi n32.egg\psycopg2\__init__.py", line 67, in <module> from psycopg2._psycopg import

pyforms cannot import conf from pysettings

狂风中的少年 提交于 2019-12-13 17:36:38
问题 This is my python file: import pyforms import pyside from pyforms import BaseWidget from pyforms.Controls import ControlText from pyforms.Controls import ControlButton class SimpleExample1(BaseWidget): def __init__(self): super(SimpleExample1,self).__init__('Simple example 1') #Definition of the forms fields self._firstname = ControlText('First name', 'Default value') self._middlename = ControlText('Middle name') self._lastname = ControlText('Lastname name') self._fullname = ControlText('Full

NLTK with flask import error

て烟熏妆下的殇ゞ 提交于 2019-12-13 16:24:17
问题 My folder directory is as such /maindir __init__.py settings.py start /run.py /venv .. other directories for flask here bin,include..etc /app __init__.py main.py views.py /nbc /__init__.py naivebayesclassifier.py The naivebayesclassifier.py module uses the nltk library as such from nltk.probability import ELEProbDist, FreqDist import nltk from collections import defaultdict from os import listdir from os.path import isfile, join I'm having an issue where if I try to run the program directly

ImportError with PyInstaller (using module pattern.de)

…衆ロ難τιáo~ 提交于 2019-12-13 16:17:55
问题 I’m using a module named pattern.de (http://www.clips.ua.ac.be/pages/pattern-de) to implement a tool for text mining. To make it available for my colleagues I wanted to convert it into a standalone application. That for I’m using PyInstaller. When I run the final executable file I get the following ImportError Traceback (most recent call last): File "<string>", line 4, in <module> ImportError: No module named pattern.de test returned -1 LOADER: OK. LOADER: Cleaning up Python interpreter. To