i use flask.I installed MySQL using easy_install mysql-python and then tried to run my app.py but got this lines of error.What is those mean?
Traceback (most recent call last):
File "app.py", line 7, in <module>
import MySQLdb
File "/Users/ozcan/Documents/python/venv/lib/python2.7/site-packages/MySQLdb/__init__.py", line 19, in <module>
import _mysql
ImportError: dlopen(/Users/ozcan/Documents/python/venv/lib/python2.7/site-packages/_mysql.so, 2): no suitable image found. Did find:
/Users/ozcan/Documents/python/venv/lib/python2.7/site-packages/_mysql.so: mach-o, but wrong architecture
I would suggest to use Flask-MySQL instead.
Here's documentation https://flask-mysql.readthedocs.org/en/latest/
Related
import psycopg2
Traceback (most recent call last): File "", line 1, in
File
"/Users/vedantwarekar/anaconda3/lib/python3.6/site-packages/psycopg2/init.py",
line 51, in
from psycopg2._psycopg import ( # noqa ImportError:
dlopen(/Users/vedantwarekar/anaconda3/lib/python3.6/site-packages/psycopg2/_psycopg.cpython-36m-darwin.so,
2): Symbol not found: _PQencryptPasswordConn Referenced from:
/Users/vedantwarekar/anaconda3/lib/python3.6/site-packages/psycopg2/_psycopg.cpython-36m-darwin.so
Expected in: /usr/lib/libpq.5.dylib in
/Users/vedantwarekar/anaconda3/lib/python3.6/site-packages/psycopg2/_psycopg.cpython-36m-darwin.so
I got this error when I installed Postgresql on my mac with the app(POSGIS).
It was resolved upon loading with brew:
brew install postgresql#<version>
getting a error while a installing a tensorflow python project from https://github.com/victordibia/skyfall
first i tried to install the requiremnt.txt file i got Could not detect requirement name for 'git+https://github.com/dpallot/simple-websocket-server.git', please specify one with #egg=your_package_name error,
then i removed the last line of txt file, then getting this
Traceback (most recent call last):
File "app.py", line 18, in
from utils import web_socket_server
File "C:\Users\anurag\Downloads\skyfall-master\utils\web_socket_server.py", line 4, in
from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket
ModuleNotFoundError: No module named 'SimpleWebSocketServer'
after that i installed git , now getting this
Traceback (most recent call last):
File "app.py", line 19, in
from utils import web_socket_client
File "C:\Users\anurag\Downloads\skyfall-master\utils\web_socket_client.py", line 8, in
from websocket import WebSocketException, WebSocketConnectionClosedException
ImportError: cannot import name 'WebSocketException'
The error means that you have not installed this package: https://github.com/dpallot/simple-websocket-server
Try this to install it(you must have pip installed and also git) and then run the project again:
python -m pip install git+https://github.com/dpallot/simple-websocket-server.git
I get the following error when starting Graphite-web using DJango.
0.9.15 works ok, but I am looking to use the new "mapSeries" function available in 0.10.x
Seems to be a missing import -
Exception occurred processing WSGI script '/opt/graphite/conf/graphite.wsgi'.
Traceback (most recent call last):
File "/opt/graphite/conf/graphite.wsgi", line 46, in <module>
import graphite.metrics.search # noqa
File "/opt/graphite/webapp/graphite/metrics/search.py", line 6, in <module>
from graphite.storage import is_pattern, match_entries
ImportError: cannot import name match_entries
I'm not a python programer, but maybe the package is missing in the setup.py?
https://github.com/graphite-project/graphite-web/blob/master/setup.py
I solved the issue by updating /opt/graphite/conf/graphite.wsgi to the latest example version.
The 0.9.x version is not compatible with 0.10.x
I recently set up Cuckoo environment on Arch Linux host with WXPSP3 guest.
When I try to upload file for analysis using submit.py I get the following error:
Traceback (most recent call last):
File "./utils/submit.py", line 23, in <module>
from lib.cuckoo.common.utils import to_unicode
File "/opt/cuckoo/utils/../lib/cuckoo/common/utils.py", line 11, in <module>
import xmlrpclib
ImportError: No module named 'xmlrpclib'
I run out of ideas. Could you help?
J
It works if I run python via python2.7 command so:
# python2.7 ./utils/submit.py <filepath>
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-10.6-intel.egg/MySQLdb/__init__.py", line 19, in <module>
import _mysql
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-10.6-intel.egg/_mysql.so, 2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/MySQL_python-1.2.4b4-py2.7-macosx-10.6-intel.egg/_mysql.so: mach-o, but wrong architecture
I'm having a lot of troubles with MySQLdb installation on MAC 10.6.8 I read many guides on how to solve without success.
What's the output on:
# which python
# which pip
If pip is installed try:
# pip install mysqldb