diff --git a/docs/workshop-virtualenv.md b/docs/workshop-virtualenv.md index b4539886..24d69c4f 100644 --- a/docs/workshop-virtualenv.md +++ b/docs/workshop-virtualenv.md @@ -5,7 +5,7 @@ Setting up virtualenvwrapper 1) Install `virtualenvwrapper`. This can be `apt-get install python3-virtualenvwrapper` on Ubuntu, or `pip install virtualenvwrapper` on most other systems. -2) Run it using `source` or `.` (so environment changes stay for the current shell). For one installed with `apt-get`, it will most likely be in `/usr/share/virtualenvwrapper/`. For `pip`, it is often in `~/.local/bin` (and you might need to run `export PATH=~/.local/bin:$PATH`). From `brew` on Mac, it is likely somwhere under `/opt/homebrew/` +2) Run it using `source` or `.` (so environment changes stay for the current shell). For one installed with `apt-get`, it will most likely be in `/usr/share/virtualenvwrapper/`. For `pip`, it is often in `~/.local/bin` (and you might need to run `export PATH=~/.local/bin:$PATH`). From `brew` on Mac, it is likely somwhere under `/opt/homebrew/` , `/usr/bin`, `/Users/{home_directory}/Library/Python/` , or `/usr/local/share/` . Please Note that for Mac users, you might have trouble setting the correct path. You might need to use the command ` which python3 `, ` which virtualenv ` and ` which virtualenvwrapper.sh ` to get the localization of each item. Here is a [link](https://stackoverflow.com/questions/49470367/install-virtualenv-and-virtualenvwrapper-on-macos), which can help you to troubleshoot the process. We normally add these three lines to our `.bashrc` so it runs on startup, but you can run these manually: diff --git a/docs/workshop.md b/docs/workshop.md index 064d8da0..09b81a1f 100644 --- a/docs/workshop.md +++ b/docs/workshop.md @@ -43,6 +43,11 @@ We recommend working in a Python environment of some sort. Our preferred tool is If you don't have a way of managing Python virtual environments, or would prefer to use `virtualenvwrapper`, we have a [short guide](workshop-virtualenv.md). *We strongly recommend working in some virtual environment, however*. +If you are a Mac user, you might have some trouble with `virtualenvwrapper` because of the differnt setting of your python. The guide we provided above include more information on how to set it up properly, and you can also look at [this page](https://stackoverflow.com/questions/49470367/install-virtualenv-and-virtualenvwrapper-on-macos) to troubleshoot. Using `pipenv` might be simpler if you failed to get `virtualenvwrapper` working. + +### For Mac Users +* You need to install the homebrew if you haven't done so, please see [this guide](https://mac.install.guide/homebrew/3). You might be prompted to install the Xcode command line tools in this process. Missing the Xcode command line tools will also results in a failure running the git command. +* After you install the homebrew, you should make sure you also installed the `wget` on your machine. You can do it through command `brew install wget`. ## Download First make sure you clone the repository: @@ -73,6 +78,8 @@ mkvirtualenv lo_workshop workon lo_workshop ``` +In `pipenv`, you can use a single `pipenv shell` command instead. + Then run the install command: ```bash