importerror

Python: py2app “ImportError: dlopen(): Library not loaded”

混江龙づ霸主 提交于 2019-12-02 08:33:16
I've written a python script that does some work with numpy and scikit's audiolab. I want to create a standalone app using py2app but I keep getting the same error no matter which OS X computer I test it on. ImportError: dlopen(/Users/transfer15/Desktop/app/dist/PCMAlign/app/Contents/Resources/lib/python2.7/numpy/linalg/lapack_lite.so, 2): Library not loaded: @rpath/libmkl_intel_lp64.dylib Referenced from: /Users/transfer15/Desktop/app/dist/PCMAlign/app/Contents/Resources/lib/python2.7/numpy/linalg/lapack_lite.so Reason: image not found This is somewhat strange to me because if I follow the

from Gui import * in python 3?

白昼怎懂夜的黑 提交于 2019-12-02 07:59:04
I'm trying this: import os, sys from Gui import * import Image as PIL import ImageTk class ImageBrowser(Gui): def __init__(self): Gui.__init__(self) self.button = self.bu(command=self.quit, relief=FLAT) def image_loop(self, dirname='.'): files = os.listdir(dirname) for file in files: try: self.show_image(file) print (file) self.mainloop() except IOError: continue except: break def show_image(self, filename): image = PIL.open(filename) self.tkpi = ImageTk.PhotoImage(image) self.button.config(image=self.tkpi) def main(script, dirname='.'): g = ImageBrowser() g.image_loop(dirname) if __name__ ==

Running into ImportError with sklearn while doing tutorial

女生的网名这么多〃 提交于 2019-12-02 06:12:42
Hi I'm trying to follow the machine learning 101 tutorial provided by sklearn, and I keep running into an error. I have the most the sklearn version downloaded from here: https://github.com/scikit-learn/scikit-learn I run Windows python: 2.7.5 (32bit) scipy: .12 numpy: 1.7.0 When I run from sklearn.linear_model import LinearRegression model = LinearRegression() I get --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-7-9f5ae92552bb> in <module>() ----> 1 from sklearn.linear_model import LinearRegression 2

Google Cloud Function - ImportError: cannot import name 'pubsub' from 'google.cloud' (unknown location)

被刻印的时光 ゝ 提交于 2019-12-02 02:34:48
问题 I am deploying a Google Cloud Function that will kick off other Google Cloud Functions using google.cloud.pubsub_v1 and I'm getting this error ImportError: cannot import name 'pubsub' from 'google.cloud' (unknown location) The beginning of my requirements.txt file looks like this # Function dependencies, for example: # package>=version google-cloud-pubsub .... The beginning of my main.py script looks like this: import base64 import json from google.cloud import pubsub_v1 publisher = pubsub_v1

Numpy ImportError when deploying Flask App using mod_wsgi/Apache2

非 Y 不嫁゛ 提交于 2019-12-01 18:31:08
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 ( print sys.path ) just before the import numpy as np and made sure that the appropriate site-packages

Unable to import sqlite3 using Anaconda Python

纵然是瞬间 提交于 2019-12-01 16:27:48
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 the problem for quite a while now to no avail. I have also successfully run pip install pysqlite3 on the

Why is importing from a package invalid when the aliased name of package is used?

自古美人都是妖i 提交于 2019-12-01 12:54:12
To make it more clear, consider a numpy example : import numpy as np from numpy import array This works as expected. But what about this: from np import array The output is: Traceback (most recent call last) <ipython-input-21-d5c81fa93e5f> in <module>() ----> 1 from np import array ModuleNotFoundError: No module named 'np' Once I have set the alias of the imported module numpy as np , shouldn't I be able to import something else using np only? Also, the id() of both is the same -- both numpy and np refer to the same thing. The module name is still numpy , even after you import the module as np

Django/Python error. “ImportError: Import by filename is not supported.”

放肆的年华 提交于 2019-12-01 11:05:18
I wanted to install Django and have troubles with the import error. I read this topic , but the answer didn't help here. Nothing happend after I changed the env variables to the module path. C:\Users\M>django-admin.py Traceback (most recent call last): File "C:\Python27\Scripts\django-admin.py", line 5, in <module> management.execute_from_command_line() File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 350, in execute_from_command_line utility.execute() File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 302, in execute settings.INSTALLED

ImportError: No module named 'tkinter' after pyInstaller

百般思念 提交于 2019-12-01 10:50:50
I want to do an executable, but ervery time I run the .exe it writes ImportError: No module named 'tkinter' , and all I read on Stackowerflow do not help me ! My python program is simple (ODE solver) and requests only : from math import* from pylab import* import numpy as np import matplotlib import numpy as np import matplotlib.pyplot as plt I paste a copy of my prog.py into the C:\Python\Scripts folder where pyInstaller is. I compute the command line pyinstaller -F eulersolver.py , this creates a prog.exe in the dist folder. When I run this code I have ImportError: No module named 'tkinter'

ImportError: No module named 'tkinter' after pyInstaller

最后都变了- 提交于 2019-12-01 10:23:32
问题 I want to do an executable, but ervery time I run the .exe it writes ImportError: No module named 'tkinter' , and all I read on Stackowerflow do not help me ! My python program is simple (ODE solver) and requests only : from math import* from pylab import* import numpy as np import matplotlib import numpy as np import matplotlib.pyplot as plt I paste a copy of my prog.py into the C:\Python\Scripts folder where pyInstaller is. I compute the command line pyinstaller -F eulersolver.py , this