Error running scripts/update while Cleaning up...

211 views
Skip to first unread message

Nolan

unread,
Jul 12, 2015, 4:18:31 PM7/12/15
to home-assi...@googlegroups.com
After running scripts/update I get an error during cleanup.  I tried to uninstall PyChromecast0.6.8.2 myself but couldn't figure it out.  Any ideas?  
Love the new update, great work everyone.




Installing collected packages: pychromecast, psutil, python-forecastio, PyMata, pyserial, responses, cookies, mock, pbr
  Found existing installation: PyChromecast 0.6.8.2
    Uninstalling PyChromecast:
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/shutil.py", line 522, in move
    os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.4/site-packages/PyChromecast-0.6.8.2-py3.4.egg-info' -> '/tmp/pip-_y935gxx-uninstall/usr/local/lib/python3.4/site-packages/PyChromecast-0.6.8.2-py3.4.egg-info'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.4/site-packages/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/usr/local/lib/python3.4/site-packages/pip/req.py", line 1431, in install
    requirement.uninstall(auto_confirm=True)
  File "/usr/local/lib/python3.4/site-packages/pip/req.py", line 598, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/usr/local/lib/python3.4/site-packages/pip/req.py", line 1836, in remove
    renames(path, new_path)
  File "/usr/local/lib/python3.4/site-packages/pip/util.py", line 295, in renames
    shutil.move(old, new)
  File "/usr/local/lib/python3.4/shutil.py", line 532, in move
    rmtree(src)
  File "/usr/local/lib/python3.4/shutil.py", line 463, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/local/lib/python3.4/shutil.py", line 421, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/usr/local/lib/python3.4/shutil.py", line 419, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'PKG-INFO'
Storing debug log for failure in /home/pi/.pip/pip.log

Ryan Kraus

unread,
Jul 13, 2015, 12:32:42 PM7/13/15
to home-assi...@googlegroups.com
Hi Nolan. It looks like you are getting permissions errors because pychromecast is installed in your systems built in Python repository. Try prepenfing the sudo command to your pip call. Like this:

sudo pip uninstall pychromecast

Home assistant has moved to using virtual environments to manage all the Python dependencies. It is a lot cleaner. Check out the install instructions in the Readme for details. A word of warning though, if you are specifically using Ubuntu 14.04, you'll need to do some extra work. I can help you through that of you need.

Nolan

unread,
Jul 13, 2015, 1:18:07 PM7/13/15
to home-assi...@googlegroups.com
Thanks for the reply, Ryan.  I had actually tried your suggested command before with no luck:

pi@raspberrypi2 ~ $ sudo pip uninstall pychromecast
Cannot uninstall requirement pychromecast, not installed

I had also tried reinstalling home-assistant using the new installation instructions using venv with the same results.  There is no error on initial installation, but I still get the error running scripts/update.

Finally as you can see from my prompt I'm using a raspberry pi running Raspbian.

Thanks,
Nolan

Ryan Kraus

unread,
Jul 13, 2015, 6:24:59 PM7/13/15
to home-assi...@googlegroups.com
Try this

python3 -m venv home-assistant
cd home-assistant
source bin/activate
python3 -m homeassistant

I added that source line. This line will force the virtual environment to be activated. Do this with a fresh download, but make sure to backup your config directory. Let me know how it goes. 
--
You received this message because you are subscribed to a topic in the Google Groups "Home Assistant Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/home-assistant-dev/hxyWD1c9ksE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to home-assistant-...@googlegroups.com.
To post to this group, send email to home-assi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/home-assistant-dev/3f64686e-4937-4be4-884e-66bf93ce8178%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Thanks,

Ryan Kraus

Ryan Kraus

unread,
Jul 13, 2015, 6:26:39 PM7/13/15
to home-assi...@googlegroups.com
Also, from my first reply, it should actually be

sudo python3 -m pip uninstall pychromecast 


--
Thanks,

Ryan Kraus

Nolan

unread,
Jul 13, 2015, 7:11:23 PM7/13/15
to home-assi...@googlegroups.com
Thank you!  source bin/activate did the trick.

Ryan Kraus

unread,
Jul 13, 2015, 7:34:02 PM7/13/15
to home-assi...@googlegroups.com
Great! 

We may want to add this to the install directions. Also, HA is getting large enough, I think, that it may be time to write a launching script that the user may copy to their /usr/local/bin directory so that they only need to type homeassistant anywhere to launch. This could also be accompanied by an install script. I feel like the install and launching of Home Assistant is what is causing a lot of the questions around here.

Paulus, if you see this, let me know what you think. If you don't see this, I'll track you down. 

Paulus Schoutsen

unread,
Jul 13, 2015, 11:08:03 PM7/13/15
to home-assi...@googlegroups.com
I think the easiest and most Pythonic way to go would be to publish a package to PyPi that would install an executable. That way we'll have a version number to refer too when people have issues and don't have to depend on git.

Installing an update would be as easy as running pip3 install --upgrade home-assistant (even from the update logic you're working on). We could actually do the update check by fetching a version number from a server that we control so that we can actually see if people are using this shit ;-) Then we'll add unique identifiers for machines and which platforms they use to get even better insight in where to focus our development efforts. Then we will start serving them ads based on the devices in their house and the way they use them and be rich… Oh wait. Skip those last parts :-D 


--
You received this message because you are subscribed to the Google Groups "Home Assistant Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to home-assistant-...@googlegroups.com.

To post to this group, send email to home-assi...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
It's nice to be important but it's more important to be nice.
Reply all
Reply to author
Forward
0 new messages