Skip to content

Commit 80ecaec

Browse files
committed
README.md: Update Installation section, add reference to brew on MacOS, add more Linux info
1 parent 4b42097 commit 80ecaec

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

README.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ the input dataset.
4646

4747
## Installation
4848

49+
**Prerequisite**: You need have Python 3.6 or higher.
50+
4951
Install from [PyPI](https://pypi.python.org/pypi) repository using `pip3`. There
5052
are too many ways to install packages in Python. The following are in order
5153
highest to lowest recommendation:
@@ -78,18 +80,24 @@ number may be different):
7880
```
7981
Collecting bigquery-schema-generator
8082
Installing collected packages: bigquery-schema-generator
81-
Successfully installed bigquery-schema-generator-0.3.2
83+
Successfully installed bigquery-schema-generator-1.1
8284
```
8385

84-
The shell script `generate-schema` is installed in the same directory as
85-
`pip3`.
86+
The shell script `generate-schema` will be installed somewhere in your system,
87+
depending on how your Python environment is configured. See below for
88+
some notes for Ubuntu Linux and MacOS.
89+
90+
### Ubuntu Linux (18.04, maybe 20.04)
8691

87-
### Ubuntu Linux
92+
After running `pip3 install bigquery_schema_generator`, the `generate-schema`
93+
script may be installed in one the following locations:
8894

89-
Under Ubuntu Linux, you should find the `generate-schema` script at
90-
`/usr/local/bin/generate-schema`.
95+
* `/usr/bin/generate-schema`
96+
* `/usr/local/bin/generate-schema`
97+
* `$HOME/.local/bin/generate-schema`
98+
* `$HOME/.virtualenvs/{your_virtual_env}/bin/generate-schema`
9199

92-
### MacOS
100+
### MacOS (10.14 Mojave)
93101

94102
If you installed Python from
95103
[Python Releases for Mac OS X](https://www.python.org/downloads/mac-osx/),
@@ -103,6 +111,14 @@ The Python installer updates `$HOME/.bash_profile` to add
103111
environment variable. So you should be able to run the `generate-schema`
104112
command without typing in the full path.
105113

114+
You can install Python3 using
115+
[Homebrew](https://docs.brew.sh/Homebrew-and-Python). In this environment, the
116+
`generate-schema` script will probably be installed in `/usr/local/bin` but I'm
117+
not completely certain.
118+
119+
I don't use my Mac very much these days and I won't upgrade to Catalina (10.15),
120+
so I can't help you with this OS version.
121+
106122
## Usage
107123

108124
The `generate_schema.py` script accepts a newline-delimited JSON or

0 commit comments

Comments
 (0)