[Docs] Fix Mac instructions in the install guide #3675

Merged
Jackenmen merged 4 commits from jack1142-patch-9 into V3/develop 2020-03-26 22:33:13 +01:00
Jackenmen commented 2020-03-20 18:32:17 +01:00 (Migrated from github.com)

Type

  • Bugfix
  • Enhancement
  • New feature
  • Docs!

Description of the changes

Fixes #3436

@aikaterna hoping that you could verify this since you actually have Mac :)

Link to rendered version of docs: https://red-discordbot--3675.org.readthedocs.build/en/3675/install_linux_mac.html#mac

### Type - [ ] Bugfix - [ ] Enhancement - [ ] New feature - [x] Docs! ### Description of the changes Fixes #3436 @aikaterna hoping that you could verify this since you actually have Mac :) Link to rendered version of docs: https://red-discordbot--3675.org.readthedocs.build/en/3675/install_linux_mac.html#mac
palmtree5 (Migrated from github.com) reviewed 2020-03-20 18:32:17 +01:00
tekulvw (Migrated from github.com) reviewed 2020-03-20 18:32:17 +01:00
aikaterna (Migrated from github.com) reviewed 2020-03-24 18:52:04 +01:00
@ -167,4 +167,4 @@
After the installation, install the required packages by pasting the commands and pressing enter,
one-by-one:
aikaterna (Migrated from github.com) commented 2020-03-24 18:52:04 +01:00

This should be all lowercase.
brew cask install adoptopenjdk/openjdk/adoptopenjdk11

This should be all lowercase. `brew cask install adoptopenjdk/openjdk/adoptopenjdk11`
aikaterna (Migrated from github.com) reviewed 2020-03-24 18:52:12 +01:00
@ -167,4 +167,4 @@
After the installation, install the required packages by pasting the commands and pressing enter,
one-by-one:
aikaterna (Migrated from github.com) commented 2020-03-24 18:52:11 +01:00

If they install through brew, it is installed with —-with-openssl with an openssl package that was built for brew, so there isn’t a need for the Install certificates.command note - they will only have that file if they have installed through the Python installer application.

If they install through brew, it is installed with —-with-openssl with an openssl package that was built for brew, so there isn’t a need for the Install certificates.command note - they will only have that file if they have installed through the Python installer application.
aikaterna commented 2020-03-24 18:53:44 +01:00 (Migrated from github.com)

I am in the process of testing the brew install command on various Macs. Homebrew has an open issue to migrate formulae to Python 3.8 but it is in progress - the default install on brew currently is Python 3.7.7. Python@3.8 is keg-only which means we will need to tell the system to use it as it is not symlinked into /usr/local. I will provide some suggested install instructions following this, after I confirm some more conditions/install situations.

I am in the process of testing the brew install command on various Macs. Homebrew has an open issue to migrate formulae to Python 3.8 but it is in progress - the default install on brew currently is Python 3.7.7. Python@3.8 is keg-only which means we will need to tell the system to use it as it is not symlinked into /usr/local. I will provide some suggested install instructions following this, after I confirm some more conditions/install situations.
aikaterna commented 2020-03-24 19:34:02 +01:00 (Migrated from github.com)

The Homebrew install link also should be updated. Using what we have on the guide:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Leads to the response:

Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in
Bash. Please migrate to the following command:
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

This new link provided works as expected.

The Homebrew install link also should be updated. Using what we have on the guide: `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"` Leads to the response: ``` Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in Bash. Please migrate to the following command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" ``` This new link provided works as expected.
aikaterna commented 2020-03-24 20:10:00 +01:00 (Migrated from github.com)

These instructions are after installing python@3.8 through brew with brew install python@3.8.

ADD TO PATH

  • Add Python 3.8 to PATH in the Terminal window:

Check if your terminal is using zsh or bash. This will be at the top of the Terminal window in the title, and will show your Mac user name and then the terminal type.

Mac OS 10.15.x if using zsh:
echo 'export PATH="/usr/local/opt/python@3.8/bin:$PATH"' >> ~/.zshrc

Other Mac OS versions or if still using bash on 10.15.x:
echo 'export PATH="/usr/local/opt/python@3.8/bin:$PATH"' >> ~/.bash_profile

LINK PYTHON THROUGH BREW

  • If you have a previously installed version of Python through brew, or if you are upgrading from an earlier version of Red:

brew list | grep python will show which Python versions are installed through brew.

For example, it may reply with a list of versions that are installed:

python
python3
python@2
python@3.8

Use brew unlink to unlink other Python versions if they are present:

brew unlink python
brew unlink python3
brew unlink python@2

Then link the new Python version:

brew link python@3.8

  • If this is a brand new OS, or a new Red installation where Red has never been installed before:

Check brew list | grep python first to make sure. This command should show no Python installs besides python@3.8. If there are other versions listed, use the instructions above in regards to unlinking them.

Link the new Python:

brew link python@3.8

If it replies with: Warning: python@3.8 is keg-only and must be linked with --force, then use:

brew link python@3.8 --force

It should reply that it is creating the symlinks for 3.8 (Linking /usr/local/Cellar/python@3.8/3.8.2... x symlinks created).

VERIFY THE PYTHON INSTALL

To test the Python install, type:

python3.8 --version

The terminal should respond with Python 3.8.2 or greater.

These instructions are after installing python@3.8 through brew with `brew install python@3.8`. ADD TO PATH * Add Python 3.8 to PATH in the Terminal window: Check if your terminal is using zsh or bash. This will be at the top of the Terminal window in the title, and will show your Mac user name and then the terminal type. Mac OS 10.15.x if using zsh: `echo 'export PATH="/usr/local/opt/python@3.8/bin:$PATH"' >> ~/.zshrc` Other Mac OS versions or if still using bash on 10.15.x: `echo 'export PATH="/usr/local/opt/python@3.8/bin:$PATH"' >> ~/.bash_profile` LINK PYTHON THROUGH BREW * If you have a previously installed version of Python through brew, or if you are upgrading from an earlier version of Red: `brew list | grep python` will show which Python versions are installed through brew. For example, it may reply with a list of versions that are installed: ``` python python3 python@2 python@3.8 ``` Use brew unlink to unlink other Python versions if they are present: `brew unlink python` `brew unlink python3` `brew unlink python@2` Then link the new Python version: `brew link python@3.8` * If this is a brand new OS, or a new Red installation where Red has never been installed before: Check `brew list | grep python` first to make sure. This command should show no Python installs besides `python@3.8`. If there are other versions listed, use the instructions above in regards to unlinking them. Link the new Python: `brew link python@3.8` If it replies with: `Warning: python@3.8 is keg-only and must be linked with --force`, then use: `brew link python@3.8 --force` It should reply that it is creating the symlinks for 3.8 (`Linking /usr/local/Cellar/python@3.8/3.8.2... x symlinks created`). VERIFY THE PYTHON INSTALL To test the Python install, type: `python3.8 --version` The terminal should respond with Python 3.8.2 or greater.
Drapersniper commented 2020-03-24 20:19:22 +01:00 (Migrated from github.com)

Just an outsiders view:

Instead of editing the bash_profile/zshrc, we may want to edit the .profile, this should simplify the instructions and the .profile should work the same across all MacOS versions.

And doing so reduces the risk of users accidentally messing up their bash_profile/zshrc, as they will be editing only the .profile which is often empty on Mac,

Just an outsiders view: Instead of editing the bash_profile/zshrc, we may want to edit the .profile, this should simplify the instructions and the .profile should work the same across all MacOS versions. And doing so reduces the risk of users accidentally messing up their bash_profile/zshrc, as they will be editing only the .profile which is often empty on Mac,
aikaterna commented 2020-03-24 20:20:20 +01:00 (Migrated from github.com)

Also to note, perhaps in those instructions above, if they try to brew link python without the bindings being freed though brew unlink, the following can occur:
image
We would want to caution users against the --overwrite flag and encourage unlinking if possible (this warning also shows what owns the link, in this case, python).

Also to note, perhaps in those instructions above, if they try to `brew link` python without the bindings being freed though `brew unlink`, the following can occur: ![image](https://user-images.githubusercontent.com/20862007/77467688-b0c86a80-6dc9-11ea-98a8-b193e554429b.png) We would want to caution users against the --overwrite flag and encourage unlinking if possible (this warning also shows what owns the link, in this case, `python`).
aikaterna (Migrated from github.com) approved these changes 2020-03-26 16:26:41 +01:00
aikaterna (Migrated from github.com) left a comment

Turns out all the fun and games with brew link aren't needed.

Turns out all the fun and games with brew link aren't needed.
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!3675
No description provided.