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

Pip install in user mode in docs #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

webknjaz
Copy link

It's not a good idea to encourage users to use sudo with Pip as it'll mess with their OS-managed site-packages content.

@martinohanlon
Copy link
Owner

bluedot needs to be installed via sudo otherwise the entry point for the python bluedot app bluedotapp cant be installed.

@webknjaz
Copy link
Author

It may need to be installed with sudo in some specific case but in general, it's bad to advise using sudo in docs.

Default install puts an entrypoint under bin/ dir of the current virtualenv.

--user install puts an entry point under ~/.local/bin/. You may need to add it to $PATH but it works.

If you do non-user install outside of a virtualenv, it attempts to use the system site-packages location which means affecting root-controlled locations. Of course, if you use sudo, it'll disregard the natural access protection but that's not a fix but a workaround. It'll also mangle any packages which are controlled by the OS package manager which is very bad and may lead to a broken system.

P.S. Besides entry points, there's also python -m invocation style which also knows how to source --user-installed dists.

If you do want to have sudo in docs, that's fine but don't put it in the default snippet which would harm newbies. Put it as an extra note and maybe link to virtualenv and pip docs by PyPA mentioning sudo as a last resort and explicitly warning about destructive side-effects.

@martinohanlon
Copy link
Owner

Please don't lecture me on what I need to do.

I understand the implications and will consider your comments.

It's important that install remains as simple as possible and single point instructions provide that. If this, take this action, otherwise, do this, only adds to confusion.

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

Successfully merging this pull request may close these issues.

2 participants