importerror

Issue when imoporting GDAL : ImportError, Library not loaded, Image not found

两盒软妹~` 提交于 2019-12-04 08:44:35
Since yesterday I struggle to import some libraries such as GDAL (or iris) and I allways get the same type of outputs. >>> import gdal Traceback (most recent call last): File "<stdin>", line 1, in <module> File "gdal.py", line 28, in <module> _gdal = swig_import_helper() File "gdal.py", line 24, in swig_import_helper _mod = imp.load_module('_gdal', fp, pathname, description) ImportError: dlopen(./_gdal.so, 2): Library not loaded: @rpath/libicui18n.56.dylib Referenced from: /Users/zoran/anaconda/lib/libgdal.20.dylib Reason: image not found I searched in my files and found: 1 files containing

Alternatives to imp.find_module?

泄露秘密 提交于 2019-12-04 06:58:55
Background I've grown tired of the issue with pylint not being able to import files when you use namespace packages and divide your code-base into separate folders. As such I started digging into the astNG source-code which has been identified as the source of the trouble (see bugreport 8796 on astng). At the heart of the issue seems to be the use of pythons own imp.find_module in the process of finding imports. What happens is that the import's first (sub)package - a in import a.b.c - is fed to find_module with a None path. Whatever path comes back is then fed into find_module the next pass

ImportError: No module named pynotify. While the module is installed

六月ゝ 毕业季﹏ 提交于 2019-12-04 05:08:47
So this error keeps coming back. Everytime I try to tun the script it returns saying: Traceback (most recent call last): File "cli.py", line 11, in <module> import pynotify ImportError: No module named pynotify The strange thing is, I just installed this plugin. I also restarted command prompt already, even the computer. But nothing, if anyone could help me out here that'd be great! Kalyan Ram Try this: pip install py-notify It worked for me. You are most likely looking for pyinotify not pynotify . That should fix your ImportError. Here is the solution for Ubuntu. First install python-notify :

ImportError while importing a python file in a pyd

强颜欢笑 提交于 2019-12-04 05:00:39
问题 Alright, so, what I'm trying to do is import a module in folders packed inside of a .pyd file. Here is something that would work for me: from apple import __init__ With apple being the .pyd in the same directory as the Python script, and __init__ of course being packed inside of the .pyd. This would work, however here is what I want to do, but doesn't work: from apple.seed.worm import WormManager Explanation: apple = pyd, seed = directory in the pyd, worm = directory in seed directory in

python 3.5 in statsmodels ImportError: cannot import name '_representation'

霸气de小男生 提交于 2019-12-04 04:23:31
I cannot manage to import statsmodels.api correctly when i do that I have this error: File "/home/mlv/.local/lib/python3.5/site-packages/statsmodels/tsa/statespace/tools.py", line 59, in set_mode from . import (_representation, _kalman_filter, _kalman_smoother, ImportError: cannot import name '_representation' I already try to re-install or update it, that does not change. plese i need help =) Please see the github report for more detail. It turns out that statsmodels is dependent upon several packages being installed before it so that it can key on them to compile its own modules. I don't

Numpy ImportError when deploying Flask App using mod_wsgi/Apache2

两盒软妹~` 提交于 2019-12-04 03:47:39
问题 I'm trying to get a Flask app running on AWS EC2 (standard Ubuntu AMI) through an Apache2 Webserver. My app internally uses Numpy. I have tested the following: Without Numpy, the App runs through Apache2. With Numpy, it trips on the import numpy and throws a 500 Server error (See logs below). With Numpy, the app runs fine when invoked directly from the command line ( i.e. python app.py ). The numpy bits work as expected and I can query app endpoints externally. I also printed the system path

MacOSX + Boost_Python + PyFTGL :- Symbol not found, expected in: flat namespace

喜你入骨 提交于 2019-12-04 03:05:31
问题 I am trying to install PyFTGL on MacOSX Yosemite. The python version I am using is 2.7 from macports. I have installed boost from macports specifying +python27. To install PyFTGL I built from source and edited the setup.py file from: module_ftgl_libs = [ 'GLU', 'GL', 'freetype', 'z', 'ftgl', 'boost_python', ] module_ftgl = Extension( 'FTGL', module_ftgl_src, include_dirs=module_ftgl_include_dirs, libraries=module_ftgl_libs ) to: module_ftgl_libs = [ 'freetype', 'z', 'ftgl', 'boost_python', ]

Unable to import sqlite3 using Anaconda Python

喜你入骨 提交于 2019-12-04 03:05:04
问题 I am trying to do the following in Python 3.7.1 on Windows import sqlite3 but I get the following error message Traceback (most recent call last): File "<console>", line 1, in <module> File "c:\programdata\anaconda3\lib\sqlite3\__init__.py", line 23, in <module> from sqlite3.dbapi2 import * File "c:\programdata\anaconda3\lib\sqlite3\dbapi2.py", line 27, in <module> from _sqlite3 import * ImportError: DLL load failed: The specified module could not be found. I have searched for a solution to

import static without package name

半城伤御伤魂 提交于 2019-12-04 02:17:20
Consider the following simple example of code: public class TestStaticImport { static enum Branches { APPLE, IBM } public static void doSomething(Branches branch) { if (branch == APPLE) { System.out.println("Apple"); } } } If we will try to compile this code, we will get the error message: java: cannot find symbol symbol: variable APPLE location: class TestStaticImport This could be solved by introducing static import of this enum : import static ... TestStaticImport.Branches.* But in this moment incomprehensible things (for me) begin: this solution works fine, everything is well compiled,

Receiving 'ImportError: cannot import name etree' when using lxml in Python on Mac

百般思念 提交于 2019-12-04 00:29:10
问题 I'm having difficulty properly installing lxml for Python on Mac. I have followed the instructions here, which after installation indicates that the installation is successful (however, there are some warnings. The full log of the install and warnings can be found here) After running the install, I am trying to run Test.py in the lxml install directory to ensure that it's working correctly. I am immediately prompted with the error: ImportError" cannot import name etree. This error results