https://github.com/oasisdigital/bazel-python-example
https://github.com/oasisdigital/bazel-python-example
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/oasisdigital/bazel-python-example
- Owner: OasisDigital
- License: other
- Created: 2022-03-22T21:02:40.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-14T16:27:59.000Z (almost 4 years ago)
- Last Synced: 2026-04-07T05:08:54.142Z (2 months ago)
- Language: Python
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Oasis Digital Bazel examples
We use these examples to teach Bazel, but you are welcome to study them
for your own purposes!
https://oasisdigital.com/class/bazel
## Python example
This is an intentionally minimal Python example.
## Python setup tips
Typically Python is already installed. Otherwise install for your
platform. Example:
brew install python
The most recommended way to install CLI addons is via pipx. Example:
brew install pipx
Then you probably want virtualenv, which acts mostly like a package
manager. It avoids putting all your packages in to the global python.
pipx install virtualenv
## Conda
However, some people install Conda and use it in place of all of the
above. Conda comes in two flavors. Anaconda is a commercial product,
Miniconda is the open source essence.
https://www.anaconda.com/products/individual
https://docs.conda.io/en/latest/miniconda.html
## Creating requirements.txt
Grab a snapshot of packages installed with pip:
Beware that some setups (like Mac Brew) use python and pip for version 2,
python3 and pip3 for version 3.
pip3 install numpy
pip3 freeze > requirements.txt
A simple contents might be:
```
numpy==1.16.6
```