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

these docs add support for a clean OS X python install #2699

Merged
merged 1 commit into from
Dec 22, 2017

Conversation

b-meson
Copy link
Contributor

@b-meson b-meson commented Dec 8, 2017

Status

Ready for review

Description of Changes

Fixes #2698.

Testing

Ran through a clean SecureDrop install (from scratch including VirtualBox, Vagrant, python etc) on a brand new OS X machine.

If you made changes to documentation:

  • Doc linting passed locally

@@ -122,7 +122,7 @@ different version, the path to ``virtualenvwrapper.sh`` will differ. Running
.. code:: sh

sudo easy_install pip # if you don't already have pip
pip install -U virtualenvwrapper
sudo -H pip install -U virtualenvwrapper --ignore-installed six
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need sudo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work without sudo. You get a permission denied error. That's why you pass the -H flag, to install in the users' home directory. Correct me if I'm wrong @redshiftzero but I think pip recommends not using sudo with pip but in this case I think the correct behavior is to use sudo and -H.

I think this is the upstream issue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The traceback in #2698 showed attempts to write the pip libs to /Library/Python/2.7/site-packages/, thus the root perms. Personally, I use pip install --user to avoid having to elevate perms for pip libs. Not sure that'll work out of the box on macOS, though.

Might be worthwhile to recommend a homebrew workflow, if possible.

The --ignore-installed six strikes me as a more glaring problem, particularly because there's no explanation for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@conorsch I looked for a homebrew solution for pip install virtualenvwrapper and couldn't easily find one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try brew install pyenv-virtualenvwrapper? I think that should work and obviate the need for sudo pip

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must defer to folks using macOS full-time, but I vastly prefer a homebrew workflow for bootstrapping the dev env. Reasons homebrew is rad:

  • common for developers to have it already
  • setup docs can be linked to, so we don't have to maintain
  • no sudo required to install pip libs (warrants further testing)

Let's shoot for a homebrew solution and fall back from there if possible. @redshiftzero I think you're honestly the best candidate for nailing these steps down, mind creating a fresh env—possibly in a new user—and running through the doc?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, I'll put this in my queue for today

@redshiftzero redshiftzero removed their assignment Dec 8, 2017
@redshiftzero redshiftzero self-assigned this Dec 21, 2017
@redshiftzero
Copy link
Contributor

brew install worked for me locally, so added a commit making that change

redshiftzero
redshiftzero previously approved these changes Dec 21, 2017
@b-meson
Copy link
Contributor Author

b-meson commented Dec 21, 2017

Hmm, I did a pip uninstall of virtualenvwrapper and tried to brew install pyenv-virtualenvwrapper and the virtualenvwrapper.sh script doesn't exist. This is on a brand new user I created (named python).

zerohistory:~ python$ source /usr/local/bin/virtualenv
virtualenv        virtualenv-clone  
zerohistory:~ python$ source /usr/local/bin/virtualenv

@redshiftzero
Copy link
Contributor

OK if you're still having trouble let's just leave it as is since at least one other contributor reported success. Restamping

@redshiftzero redshiftzero removed their assignment Dec 21, 2017
@redshiftzero redshiftzero merged commit 119725e into develop Dec 22, 2017
@redshiftzero redshiftzero deleted the docs-osxsetup branch December 22, 2017 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants