Open shadow05139 opened 5 years ago
You are not located within a python 3 virtualenv! (You can see that on the python2.7
string)
Here a suggestion how to deal with it:
sudo -u homeassistant -H -s
mkdir /srv/homeassistant/xbox-venv
python3 -m venv /srv/homeassistant/xbox-venv
/srv/homeassistant/xbox-venv/bin/activate
pip install xbox-rest-server
xbox-rest-server
PS: You can of course create an entirely new user to just serve the xbox rest server PPS: To start it as a service automatically, see README
ok cool thanks for that will do that thnx :)
Im now snagged on 4. homeassistant@hassbian:/home/pi $ /srv/homeassistant/xbox-venv/bin/activate bash: /srv/homeassistant/xbox-venv/bin/activate: Permission denied
Normally that should not happen...
chmod +x /srv/homeassistant/xbox-venv/bin/activate
got that sorted but now bun now pip wont install xbox-rest-server
homeassistant@hassbian:/home/pi $ pip install xbox-rest-server Collecting xbox-rest-server Could not find a version that satisfies the requirement xbox-rest-server (from versions: ) No matching distribution found for xbox-rest-server
Oops, its pip install xbox-smartglass-rest
oh ok all good that's now put me right back at the start now with the same error within this env now :-/
homeassistant@hassbian:/home/pi $ xbox-rest-server
Traceback (most recent call last):
File "/usr/local/bin/xbox-rest-server", line 7, in
You are either NOT YET in the python 3 virtual env - or not anymore, after installation. You have to stay in the python 3 context to execute it....
alright got that all sorted was loading from installs outside the env fixed by running pip uninstall xbox-smartglass-rest as pi almost got it working but starting it returns command not found?
homeassistant@hassbian:/home/pi $ xbox-smartglass-rest bash: xbox-smartglass-rest: command not found
this is my output running on my Stretch hassbain running HA vr0.89.1
Traceback (most recent call last): File "/usr/local/bin/xbox-rest-server", line 7, in
from xbox.rest.scripts.rest_server import main
File "/usr/local/lib/python2.7/dist-packages/xbox/rest/scripts/rest_server.py", line 9, in
from xbox.rest.app import app
File "/home/pi/.local/lib/python2.7/site-packages/gevent/builtins.py", line 96, in import
result = _import(*args, *kwargs)
File "/usr/local/lib/python2.7/dist-packages/xbox/rest/app.py", line 2, in
from http import HTTPStatus
File "/home/pi/.local/lib/python2.7/site-packages/gevent/builtins.py", line 96, in import
result = _import( args, **kwargs)
ImportError: No module named http