{"id":19975430,"url":"https://github.com/briangershon/setup-python-for-machine-learning","last_synced_at":"2026-04-25T08:38:23.436Z","repository":{"id":136995759,"uuid":"173838560","full_name":"briangershon/setup-python-for-machine-learning","owner":"briangershon","description":"Instructions for adding a Python3 virtual environment on MacOS for your Machine Learning project.","archived":false,"fork":false,"pushed_at":"2021-09-18T15:23:06.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-23T10:51:34.701Z","etag":null,"topics":["machine-learning","macos-setup","python","python3","virtual"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/briangershon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-04T23:34:24.000Z","updated_at":"2021-09-18T15:23:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"747521be-2cfc-4fff-bec5-91ad7461feeb","html_url":"https://github.com/briangershon/setup-python-for-machine-learning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/briangershon/setup-python-for-machine-learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fsetup-python-for-machine-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fsetup-python-for-machine-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fsetup-python-for-machine-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fsetup-python-for-machine-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/briangershon","download_url":"https://codeload.github.com/briangershon/setup-python-for-machine-learning/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/briangershon%2Fsetup-python-for-machine-learning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32256006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T04:23:17.126Z","status":"ssl_error","status_checked_at":"2026-04-25T04:21:53.360Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","macos-setup","python","python3","virtual"],"created_at":"2024-11-13T03:18:20.361Z","updated_at":"2026-04-25T08:38:23.422Z","avatar_url":"https://github.com/briangershon.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# setup-python-for-machine-learning\n\nThese are MacOS setup instructions for adding a Python 3 virtual environment for any project, installing popular Machine Learning packages, and setting up Visual Studio Code editor.\n\nThese virtual environment setup instructions can be used for any project, but focus here is on setting up a Machine Learning environment.\n\nI prefer this classic Python virtual environment approach since the environment lives within your project's folder and is self-contained, which makes it easier to work on across machines. You can just clone your project and setup an environment on each machine.\n\nThough if you're just getting started with Python, you may want to go the Anaconda route. Jennifer Walker has some nice [Python setup instructions](https://jenfly.github.io/datajam-python/SETUP).\n\n## Install Python 3 on MacOS\n\n    # Install via Homebrew\n    brew install python3\n    which python3   # should show `/usr/local/bin/python3`\n    python -V       # should show version\n\n## Manage Python Virtual Environment\n\n    # create a folder to hold your project and jump into that folder\n    mkdir my-cool-project\n    cd my-cool-project\n\n    # create new virtual environment in your projects folder\n    # venv is the standard way of creating virtual envs on Python\n    python3 -m venv env\n\n    # add \"env\" to your .gitignore so env is never checked-in\n    echo \"env\" \u003e .gitignore\n\n    # activate environment\n    source env/bin/activate\n\n    # upgrade pip and setuptools\n    pip install --upgrade pip setuptools wheel\n\n## Setup and Run Jupyter Notebooks\n\nUse Jupyter Notebook to edit and run your programs. This supports a nice mix of code, markdown docs, and visual elements like images and plots.\n\n    # Install Jupyter Notebooks and ipython\n    pip install jupyter jupyterlab\n    ipython kernel install --user --name=.env\n\n    # start Jupyter notebook or JupyterLab\n    jupyter notebook\n    jupyter lab\n\n    # open an `.ipynb` notebook file via Jupyter running in the browser\n\n## Install popular Machine Learning packages\n\n    # Install other popular libraries as desired\n    pip install numpy pandas matplotlib seaborn plotly\n    pip install tensorflow scikit-learn\n\n    # if you're doing image processing install Pillow (PIL fork)\n    brew install libtiff libjpeg webp littlecms\n    pip install Pillow\n\n## Save installed packages and versions\n\n    # save all installed python packages into a file...\n    pip freeze \u003e requirements.txt\n\n    # ...which can then be loaded via `pip install`\n    pip install -r requirements.txt\n\n    # to deactive an environment\n    deactivate\n\n## Setup Visual Studio Code\n\nIf you want to run program directly in Visual Studio Code editor, just install the VS Code Python plugin from Microsoft. It automatically looks for virtual environments in the project's folder.\n\nHowever if you need to do this manually, choose `View \u003e Command Palette...` then `Python: Select Interpreter` then pick the virtual env one.\n\nFor more info, see \u003chttps://code.visualstudio.com/docs/python/environments\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbriangershon%2Fsetup-python-for-machine-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbriangershon%2Fsetup-python-for-machine-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbriangershon%2Fsetup-python-for-machine-learning/lists"}