Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permissions problem OSX #401

Closed
nat-om opened this issue May 27, 2014 · 8 comments
Closed

Permissions problem OSX #401

nat-om opened this issue May 27, 2014 · 8 comments

Comments

@nat-om
Copy link

nat-om commented May 27, 2014

I've run into an issue with installing and running livestreamer. In order to install it I need to run it as root, and by doing so it seems to get installed to a root directory that I can't access without root access. This wouldn't be an issue but I can't run live livestreamer as root due to VLC not allowing it.

Running without root access gives "-bash: livestreamer: command not found"
Running with root gives (and --yes-run-as-root): "Failed to start player: /Applications/VLC.app/Contents/MacOS/VLC (Process exited prematurely)"

Has anyone on OSX experienced this and/or know how to get around it? Thanks.

@skulblakka
Copy link
Contributor

I'm using livestreamer without any issue on my mac. I can simply run it by entering "livestreamer" into Terminal without having root access. But maybe looking into #147 and/or #355 will help you.

@nat-om
Copy link
Author

nat-om commented May 27, 2014

Thanks for the help, I've looked into both of those but to no avail.

#147 was a broken cache file, one that I don't even have yet as I haven't been able to run livestreamer yet.
#355 actually looks like my error, but sadly the solution he found was just reinstalling OSX, something I'm not sure I want to do or need to do on a macbook that's less than 24 hours old.

Regardless, I appreciate the effort.

@chrippa
Copy link
Owner

chrippa commented May 28, 2014

There was a bunch of workarounds proposed in #355, none of them helped you either?

@bsdlp
Copy link

bsdlp commented Jun 14, 2014

You don't want to install packages as root.

@nat-om
Copy link
Author

nat-om commented Jun 19, 2014

@chrippa That was the first place I went to when I ran into this and tried everything there, he had the same problem and his only solution was to reinstall OSX.

@fly I understand that causes issues, which might be causing this, but I have no other choice but to install it as root, it simply does not install otherwise and throws a permissions error.

@medina
Copy link
Contributor

medina commented Aug 10, 2014

re: finding yourself needing to install / run Python things as root, or having many Python libraries you work on, I suggest using virtualenv and the helpful virtualenvwrapper which will try to keep everything you pip install in a separate directory structure under your account.

So try:

$ sudo pip install virtualenv


# This creates a separate directory named "PyEnvs" under your account to install into
$ virtualenv "~/PyEnvs/livestreamer"
New python executable in ~/PyEnvs/livestreamer/bin/python
Installing setuptools, pip...done.


# Go into the directory separate directory and install, no root perms should be needed
$ source "~/PyEnvs/livestreamer/bin/activate"
(livestreamer)$ pip install livestreamer
Downloading/unpacking livestreamer
[...package + other dependencies isntalled...]
Successfully installed livestreamer singledispatch requests six
Cleaning up...


# if you want to leave this separate directory
(livestreamer)$ deactivate
$


# Next time you want to use livestreamer, something like this "just works", no root needed
$ source "~/PyEnvs/livestreamer/bin/activate"
(livestreamer)$ livestreamer http://www.twitch.tv/sc2proleague best

@nat-om
Copy link
Author

nat-om commented Aug 14, 2014

@medina Thank you so much for that write up, it worked perfectly and everything works exactly as it should now. I really appreciate you taking the time to do that.

@medina
Copy link
Contributor

medina commented Aug 15, 2014

Glad to hear it, @NickTompk!

@chrippa maybe "use virtualenv" could go in the wiki or FAQ as a best practice for installing w/o permission issues or dependency conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants