importerror

Getting “ImportError: DLL load failed: The specified module could not be found” when using cx_Freeze even with tcl86t.dll and tk86t.dll added in

可紊 提交于 2019-11-27 02:24:38
I am trying to convert a .py file to .exe using cx_Freeze 5.1.1., but an ImportError: DLL load failed pops up every time I try to run the file. Based on the suggested solutions here and here , I added tcl86t.dll and tk86t.dll to the list of included files. They appear in the build folder, but the error message keeps popping up. Here is my setup.py: import sys import os from cx_Freeze import setup, Executable os.environ["TCL_LIBRARY"] = r"C:/Users/Name/AppData/Local/Programs/Python/Python36-32/tcl/tcl8.6" os.environ["TK_LIBRARY"] = r"C:/Users/Name/AppData/Local/Programs/Python/Python36-32/tcl

Django + mod_wsgi + apache: ImportError at / No module named djproj.urls

好久不见. 提交于 2019-11-27 02:14:38
问题 I'm trying to deploy my Django application on my linode server with apache and mod_wsgi. file: /srv/www/example.com/djproj/django.wsgi import os import sys sys.path.append('/srv/www/example.com/djproj') os.environ['PYTHON_EGG_CACHE'] = '/srv/www/example.com/.python-egg' os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() file: /etc/apache2/sites-available/example.com /etc/apache2/sites-available/example.com

Counter in Collections module Python

与世无争的帅哥 提交于 2019-11-27 01:59:51
I've come across a really weird problem. I'm trying to use Counter function in collections module. However, I keep getting the same error message AttributeError: 'module' object has no attribute 'Counter' I have tried using it before and it worked fine, but now for some reason when I import "collections" module it has a very limited number of attributes. I have tried: import collections # when calling Counter I would then use collections.Counter() import collections as collect # collect.Counter() For both of those I keep getting Attribute Error. I have also tried from collections import

Python/IPython ImportError: no module named site

假装没事ソ 提交于 2019-11-27 01:49:56
问题 I had python 2.7.3 and ipython 1.2 up and running correctly on my Linux system ( ubuntu 12.04 ) but was trying to install an updated version of matplotlab needed for coursework. After running this code line in the terminal user$ sudo easy_install -U distribute user$ export PYTHONHOME=/usr/lib/python2.7/ now every time I try and run python or ipython I get the error message ImportError: no module named site how do I reverse/fix this problem?? I'm so lost. I looked at other similar issues, but

How to get current import paths in Python?

亡梦爱人 提交于 2019-11-27 01:01:05
问题 I get an ImportError exception somewhere in the code, but the same module can be imported safely at startup of the application. I'm curious to see which paths Python looks for modules to import, so that I can trace why this problem occurs. I found this: print sys.path Is this the list of ALL paths that system looks when tries to import a module? 回答1: The path locations that python checks by default can be inspected by checking sys.path. import sys print(sys.path) 回答2: If you want a bit better

unexpected reserved word import in node.js

元气小坏坏 提交于 2019-11-27 00:50:16
问题 I'm trying to run node.js backend server. I've received error unexpected reserved word on import in Node.js file. The lines in file core.module.js is: 'use strict'; import lodashMixins from './lodashMixins.js' ... other imports and configurations ... I launch simple command: node core.module.js It's not uncommon error, but usually it happens with other libraries. I haven't seen solution for Node.js. How should I fix this? I'm using Windows Server. Edit: I've find out that it's ES6, but how

ImportError: No module named 'bottle' - PyCharm

戏子无情 提交于 2019-11-26 22:06:44
I installed bottle on python3.4 with pip install. In terminal, when I do: $ python3.4 >>>import bottle # shows no import error >>> but when I do it in PyCharm, it says "import bottle ImportError: No module named 'bottle'" in your PyCharm project: press Ctrl + Alt + s to open the settings on the left column, select Project Interpreter on the top right there is a list of python binaries found on your system, pick the right one eventually click the + button to install additional python modules validate In some cases no "No module ..." can appear even on local files. In such cases you just need to

Import error in twilio

混江龙づ霸主 提交于 2019-11-26 22:05:13
问题 I am having the same problem as this thread regarding twilio-python: twilio.rest missing from twilio python module version 2.0.8? However I have the same problem but I have 3.3.3 installed. I still get "No module named rest" when trying to import twilio.rest. Loading the library from stand alone python script works. So I know that pip installing the package worked. from twilio.rest import TwilioRestClient def main(): account = "xxxxxxxxxxxxxxxx" token = "xxxxxxxxxxxxxxxx" client =

ImportError: No Module Named bs4 (BeautifulSoup)

无人久伴 提交于 2019-11-26 21:59:53
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. Balthazar Rouberol 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 your virtualenv python. If you do not need bs4 to be installed in your system python path,

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

旧街凉风 提交于 2019-11-26 21:22:13
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: cannot import name main catalinpopescu The bug is found in pip 10.0.0. In linux you need to