Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create documentation on installation procedure #33

Open
virginiascarlett opened this issue Jul 11, 2024 · 2 comments
Open

Create documentation on installation procedure #33

virginiascarlett opened this issue Jul 11, 2024 · 2 comments
Assignees

Comments

@virginiascarlett
Copy link
Collaborator

I think Mike would find this reassuring, and we'll want to do it eventually anyway

@virginiascarlett
Copy link
Collaborator Author

Rob can write up the low-level stuff, basically explaining the architecture of our stack. Not a step-by-step guide, just the broad strokes.
Virginia can do the user guide, which is more of a step-by-step instruction manual for the next librarian.

@virginiascarlett
Copy link
Collaborator Author

virginiascarlett commented Sep 23, 2024

UPDATE: I FINALLY got this working on my mac. Here's what I had to do to install:
Clone the repo + create venv, as described in our docs.
Install MySQL version 8.0.32 for MacOS13 (even though I’m running MacOS 14) from here: https://downloads.mysql.com/archives/community/
Do:
export PATH=$PATH:/usr/local/mysql/bin (or wherever MySQL was installed)
Do a find command to figure out where this file is located: mysqlclient.pc
Then use that path in this command:
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/mysql-8.0.32-macos13-arm64/lib/pkgconfig
Then set a few more environment variables:

export MYSQLCLIENT_LDFLAGS=$(pkg-config --libs mysqlclient)
export MYSQLCLIENT_CFLAGS=$(pkg-config --cflags mysqlclient)
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$PATH

Then, while in the dis venv, do:
pip install mysqlclient==2.1.1 --no-cache-dir
(The --no-cache-dir is important)

DONE. I edited my ~/.bashrc to include this: (actually it's ~/.zshrc because new macs use zsh instead of bash)

#Add mysql and mysql_config to PATH
export PATH=$PATH:/usr/local/mysql/bin
export PKG_CONFIG_PATH=/usr/local/mysql-8.0.32-macos13-arm64/lib/pkgconfig
export MYSQLCLIENT_LDFLAGS=$(pkg-config --libs mysqlclient)
export MYSQLCLIENT_CFLAGS=$(pkg-config --cflags mysqlclient)
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$PATH

Related forum links:
PyMySQL/mysqlclient#584
https://stackoverflow.com/questions/63109987/nameerror-name-mysql-is-not-defined-after-setting-change-to-mysql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants