getting this error while loading a tensorflow project - python

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

Related

Gives this error when importing utils.sql what could be the problem?

This error is displayed in the console
Traceback (most recent call last):
File "main.py", line 12, in <module>
from utils.sql import ManagerDB
ModuleNotFoundError: No module named 'utils.sql'
check your project if "utils" is your own python package, name "utils" is too generic,unlikely is a PYPI package which you install by pip

(windows server 2016) (python/Django) Couldn't import Django

The full error message:
Traceback (most recent call last):
File "manage.py", line 9, in <module>
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django.core'; 'django' is not a package
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "manage.py", line 15, in <module>
) from exc
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
I have tried adding django directly to the PYTHONPATH, no dice
I have created a virtual environment and installed django in it, still nothing
According to pip freeze I got Django 2.1.2 installed
I'm pretty sure I'm using python 3.7.0
Apparently I can import django just fine (by just typing "import django" in an empty test.py file), but when I try to import django.core it gives me the following error:
Traceback (most recent call last):
File "test.py", line 7, in
import django.core
ModuleNotFoundError: No module named 'django.core'; 'django' is not a package
(stackoverflow won't let me format it as code for some reason)

Can't find submodule in package

I'm using Anaconda3 version 4.2.0 on ubuntu (in docker).
Anaconda is installed in /root/anaconda3 folder.
I installed theano_bpr package using pip install theano_bpr.
Now when i open python and try import theano_bpr, i get the following message:
>>> import theano_bpr
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/anaconda3/lib/python3.5/site-packages/theano_bpr/__init__.py", line 17, in <module>
from bpr import BPR
ImportError: No module named 'bpr'
However, when i navigate to /root/anaconda3/lib/python3.5/site-packages/theano_bpr/ and run python there, i'm able to import theano_bpr.
In /root/anaconda3/lib/python3.5/site-packages/theano_bpr/ there are following files:
__init__.py, bpr.py (this one is causing problems), t.py, and utils.py.

Can't import the py-translate 1.03 package

Is someone familiar with these package?
I tried easy install and many things I saw in imports problems solution
>>> import translate
output:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import translate
File "C:\Python27\lib\site-packages\translate\__init__.py", line 8, in <module>
from .translator import *
File "C:\Python27\lib\site-packages\translate\translator.py", line 13, in <module>
import requests
ImportError: No module named requests
Moreover, in the directory of the package there is a test file.
I tried to run it but I got this:
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\translate\tests\test_translator.py", line 10, in <module>
from ..translator import translator
ValueError: Attempted relative import in non-package
How have you installed py-translate.
It requires: requests
My advice is pip install requests (or easy_install requests)
Their latest release is 1.0.2, but also goes by 1.0.3.
Pip install the package, don't just download the archive as you will miss the dependancies

ImportError: cannot import name ResourceError

I'm trying to install couchdb app on debian using the following command
couchapp push http://user:pass#localhost:5984/acra-appname
and I'm having the following error output:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/restkit/__init__.py", line 9, in <module>
from restkit.conn import Connection
File "/usr/local/lib/python2.6/dist-packages/restkit/conn.py", line 14, in <module>
from socketpool import Connector
ImportError: No module named socketpool
Traceback (most recent call last):
File "/usr/local/bin/couchapp", line 7, in <module>
from couchapp.dispatch import run
File "/usr/local/lib/python2.6/dist-packages/couchapp/dispatch.py", line 10, in <module>
import couchapp.commands as commands
File "/usr/local/lib/python2.6/dist-packages/couchapp/commands.py", line 15, in <module>
from couchapp import clone_app
File "/usr/local/lib/python2.6/dist-packages/couchapp/clone_app.py", line 15, in <module>
from couchapp.errors import AppError
File "/usr/local/lib/python2.6/dist-packages/couchapp/errors.py", line 7, in <module>
from restkit import ResourceError
ImportError: cannot import name ResourceError
As far as I understand the error is:
ImportError: No module named socketpool
How can I install this module or how to resolve the problem?
As Ifthikhan sugessted: Install it using a package manager such as apt-get and thereafter using pip you can install socketpool.
I had this problem when installing couchapp. I used pip to install it, and I thought it completed, but when I ran it I had the ImportError problem. Turns out the pip install didn't succeed and I first needed to:
apt-get install python-dev
Then when I did a
pip install couchapp
all of the dependencies were installed and couchapp ran without a problem.

Categories

Resources