Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add guide on using multiple Python versions for local development #1621

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

Merged
merged 7 commits into from
Aug 9, 2018

Conversation

tswast
Copy link
Contributor

@tswast tswast commented Aug 8, 2018

This guide recommends pyenv and pyenv-virtualenv. I know there are many options, but this is what works for me.

@tswast tswast requested a review from billyjacobson August 8, 2018 20:54
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 8, 2018
brew install pyenv
```

1. Install the [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)
Copy link
Member

Choose a reason for hiding this comment

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

Can you put the command to install it here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in a739f4d

MAC_SETUP.md Outdated
1. Install the [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv)
plugin.

1. Add
Copy link
Member

Choose a reason for hiding this comment

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

Append the following to your ~/.bashrc file:

MAC_SETUP.md Outdated
brew upgrade pyenv
```

1. Compile the necessary Python versions with pyenv.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe say something like grab the latest minor versions of the major version you are looking for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in 327f506

MAC_SETUP.md Outdated
1. Set the local Python version(s) with `pyenv local`

```
pyenv local python-docs-samples 3.6.4 3.7.0 3.5.4 2.715
Copy link
Member

Choose a reason for hiding this comment

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

Could you include above this line what the 2 parameters are like
#pyenv local [name of virtualenv] [list of python versions to use]
pyenv local python-docs-samples 3.6.4 3.7.0 3.5.4 2.715

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in a739f4d

Copy link
Member

@billyjacobson billyjacobson left a comment

Choose a reason for hiding this comment

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

Looks great :) Thanks for writing this

MAC_SETUP.md Outdated
pyenv local python-docs-samples 3.6.4 3.7.0 3.5.4 2.7.15
```

1. Now when you `cd` into the source directory or a subdirectory within it,
Copy link
Member

Choose a reason for hiding this comment

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

nit: s/Now/Now,

MAC_SETUP.md Outdated
more than one version, it will also add binaries like `python36` and
`python27` to your PATH, which nox uses when picking Python interpreters.

1. Since we don't want to add the pyenv configuration to git, add
Copy link
Member

Choose a reason for hiding this comment

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

Rephrasing suggestion: Add .python-version to your global gitignore file, so it wont be committed into the repository.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like it! Done.

@tswast tswast merged commit 277d267 into master Aug 9, 2018
@tswast tswast deleted the tswast-mac-setup branch August 9, 2018 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.