realpython / realpython/python-guide
Describing making Python 3 the default `python` under Homebrew
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Batchfile
- Star
- 29.8k
- Fork
- 5.9k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
So, about this section in the OS X installation guides:
That opt/python/libexec behavior is not actually about 10.12 Sierra vs. newer versions of macOS. Homebrew does not make the unqualified python command be Python 3 on any version of macOS. If this behavior was different in the past, that was due to a different Homebrew version, not a different macOS version. (Homebrew's policy is to not shadow system-provided components in a way that might break things.)
Maybe this section should be updated to something like:
Once you've installed Homebrew, insert the Homebrew directory at the top
of your :envvar:`PATH` environment variable if you are running 10.12 Sierra or older.
You can do this by adding the following line at the bottom of your :file:`~/.profile` file:
.. code-block:: console
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
Now, we can install Python 3:
.. code-block:: console
$ brew install python
Then, to make your default `python` command point to Python 3:
.. code-block:: console
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
And the section in the Python 2 installation about doing PATH="/usr/local/opt/python@2/libexec/bin:$PATH" is no longer necessary: the Homebrew python@2 formula now provides a python command that is in /usr/local/bin by default.
Might also want to provide a link to Homebrew's Homebrew and Python page, which goes in to more detail.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tìm trong các hướng dẫn cài đặt OS X phần về Homebrew và Python 3 được nêu trong issue, sau đó đọc trang Homebrew về Homebrew và Python để biết hành vi hiện tại. Cập nhật hướng dẫn cho Python 3 và Python 2 để phản ánh cách xử lý PATH và liên kết đến tài liệu Homebrew; hoàn tất khi sự khác biệt giữa các phiên bản macOS và hành vi mặc định của lệnh python là chính xác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- documentation
- Loại issue
- Tài liệu
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 35/100