Merge pull request #4406 from commitay/python-3.7

language/python, docs: updates for python 3.7
This commit is contained in:
ilovezfs 2018-07-10 10:10:25 +01:00 committed by GitHub
commit 0aab25bdb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -8,7 +8,7 @@ module Language
Version.create(version.to_s) Version.create(version.to_s)
end end
def self.homebrew_site_packages(version = "3.6") def self.homebrew_site_packages(version = "3.7")
HOMEBREW_PREFIX/"lib/python#{version}/site-packages" HOMEBREW_PREFIX/"lib/python#{version}/site-packages"
end end

View File

@ -11,8 +11,8 @@ Starting with OS X Lion (10.7), you need `sudo` to install to these like
so: `sudo gem install`, `sudo easy_install` or `sudo cpan -i`. so: `sudo gem install`, `sudo easy_install` or `sudo cpan -i`.
An option to avoid sudo is to use an access control list: An option to avoid sudo is to use an access control list:
`chmod +a 'user:YOUR_NAME_HERE allow add_subdirectory,add_file,delete_child,directory_inherit' /Library/Python/3.6/site-packages`, `chmod +a 'user:YOUR_NAME_HERE allow add_subdirectory,add_file,delete_child,directory_inherit' /Library/Python/3.y/site-packages`,
for example, will let you add packages to Python 3.6 as yourself. That for example, will let you add packages to Python 3.y as yourself. That
is probably safer than changing the group ownership of the directory. is probably safer than changing the group ownership of the directory.
### So why was I using sudo? ### So why was I using sudo?

View File

@ -51,12 +51,12 @@ The `site-packages` is a directory that contains Python modules (especially bind
$(brew --prefix)/lib/pythonX.Y/site-packages $(brew --prefix)/lib/pythonX.Y/site-packages
``` ```
So, for Python 3.6.x, you'll find it at `/usr/local/lib/python3.6/site-packages`. So, for Python 3.y.z, you'll find it at `/usr/local/lib/python3.y/site-packages`.
Python 3.6 also searches for modules in: Python 3.y also searches for modules in:
- `/Library/Python/3.6/site-packages` - `/Library/Python/3.y/site-packages`
- `~/Library/Python/3.6/lib/python/site-packages` - `~/Library/Python/3.y/lib/python/site-packages`
Homebrew's `site-packages` directory is first created if (1) any Homebrew formula with Python bindings are installed, or (2) upon `brew install python`. Homebrew's `site-packages` directory is first created if (1) any Homebrew formula with Python bindings are installed, or (2) upon `brew install python`.