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

python 3 setup slightly incorrect for OSX High Sierra #895

Open
bnorquist opened this issue Mar 22, 2018 · 7 comments
Open

python 3 setup slightly incorrect for OSX High Sierra #895

bnorquist opened this issue Mar 22, 2018 · 7 comments

Comments

@bnorquist
Copy link
Contributor

bnorquist commented Mar 22, 2018

When using brew install python and adding export PATH=/usr/local/bin:/usr/local/sbin:$PATH to your .profile python still points to the system python executable. Instead you have to add this to the .profile: export PATH="/usr/local/opt/python/libexec/bin:$PATH".

I created a local branch on my computer with this edit but it is saying I don't have permissions to push it. I did a good amount of googling to get this set up so figured I would try to save others the time in the future :)

see first comment on this SA thread: https://stackoverflow.com/questions/5157678/python-homebrew-by-default/48101303#48101303

@mnunezdm
Copy link

@kennethreitz
Copy link
Contributor

Please send a pull request!

@bnorquist
Copy link
Contributor Author

@charliesneath
Copy link

@bnorquist I was having a similar problem, but followed the instructions in the note in this section of the documentation:

If pipenv isn’t available in your shell after installation, you’ll need to add the user base‘s binary directory to your PATH.

On Linux and macOS you can find the user base binary directory by running python -m site --user-base and adding bin to the end. For example, this will typically print ~/.local (with ~ expanded to the absolute path to your home directory) so you’ll need to add ~/.local/bin to your PATH. You can set your PATH permanently by modifying ~/.profile.

When I run python -m site --user-base, I get /Users/charliesneath/Library/Python/3.6. I added the following to ~./profile:

export PATH="~/Library/Python/3.6/bin"

and this fixed this issue I was having not being able to run pipenv.

Is this related to the fix you found above?

@charliesneath
Copy link

Realized this is mentioned in #840 by @chsm in his comment.

@apjanke
Copy link
Contributor

apjanke commented Dec 18, 2018

See #960 for a bit more discussion.

@AucaCoyan
Copy link

and this fixed this issue I was having not being able to run pipenv.

Hi! Even if you could run pipenv, the documentation of pipenv discourages the installation with brew install pipenv:

Homebrew installation is discouraged because each time the Homebrew Python is upgraded, which Pipenv depends on, users have to re-install Pipenv, and perhaps all virtual environments managed by it.

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

No branches or pull requests

6 participants