Closed insuhpak closed 11 months ago
I am going through and evaluating the workstation setup documentation from a macos perspective since I am on mac now. These notes are from installation on a brand new mac (nothing has been installed).
Adding additional notes/edits to this ticket:
ikpak@BAP-ikpak ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password)...
Sorry, user ikpak may not run sudo on BAP-ikpak.
Need sudo access on macOS (e.g. the user ikpak needs to be an Administrator)!
Also, I think current Homebrew installation instructions are bash-specific, not for zsh. (I am running zsh since it is macos default.)
Perhaps, for dbt workstation setup we should tell users to use bash. Since windows can only use Git Bash that is offered through vscode.
Note, users still need to install xcode.
ikpak@BAP-ikpak .pyenv % git clone https://github.com/pyenv/pyenv.git ~/.pyenv
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
Users will now be able to install pyenv, however they cannot install python completely. Users need xz (i.e. the missing lzma lib).
ikpak@BAP-ikpak ~ % pyenv install 3.9.13
Downloading openssl-1.1.1n.tar.gz...
-> https://www.openssl.org/source/openssl-1.1.1n.tar.gz
Installing openssl-1.1.1n...
Installed openssl-1.1.1n to /Users/ikpak/.pyenv/versions/3.9.13
Downloading readline-8.1.tar.gz...
-> https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz
Installing readline-8.1...
Installed readline-8.1 to /Users/ikpak/.pyenv/versions/3.9.13
Downloading Python-3.9.13.tar.xz...
-> https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tar.xz
Installing Python-3.9.13...
python-build: use zlib from xcode sdk
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/ikpak/.pyenv/versions/3.9.13/lib/python3.9/lzma.py", line 27, in <module>
from _lzma import *
ModuleNotFoundError: No module named '_lzma'
WARNING: The Python lzma extension was not compiled. Missing the lzma lib?
Installed Python-3.9.13 to /Users/ikpak/.pyenv/versions/3.9.13
Users can install this using pip. <-- this doesn't work. Not going to resolve this error until a specific issue arises.
**Update: It does not seem like users need to install the module _lzma
. After python 3.3 all installations include the module lzma
, so I am not 100% sure why this error is showing. There are discussions about this issue online. I also confirmed that python scripts run and dbt runs as it should.
@tgraham-ucsc BTW, officially switched to mac. I will be updating the documentation with the previous feedback and anything new I encounter myself.
@insuhpak welcome!! 🍎 😄 🍏
The one source I found that finally got me to onboard with python environments is Installing pyenv on macOS for Zsh using Homebrew
Are you using bash or zsh ? I thought Mac changed their default to zsh a while back
@tgraham-ucsc I am using zsh
and yes it is the default!
I am trying to go a different route than Homebrew only because users need an admin account to install Homebrew. And I want to see if it is possible to successfully complete the setup without Homebrew. It would be ideal if users can setup without needing someone with admin access.
But Homebrew does make it simple.
Additional details regarding Paul's comment on .bash-profile
.
Should we be recommending .bashrc, .zshrc, .bash-profile, .zprofile, .envs?? others??
Some resources:
This issue will be included in issue #48
Workstation set up specific feedback in this ticket.
Workstation Setup
Install Python using pyenv