macOS Catalina 10.15.4
newly
python3 -m venv env
After building a virtual environment with
pip install mysqlclient
When I run, I run into a title error.
First of all, there is someone who hits the same error first! When I think about it, it seems that there are two patterns, and this is the first case.
Cannot install Pillow in macOS Mojave using brew #3438
This person seems to have given an error when trying to install pillow with pip, and the cause seems to be mojave. So the solution is
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
When I ran, I stopped coming out! And that. However, in my case, following these steps did not resolve the error. It seems that this procedure is not possible for those who have updated to Catalina in the first place.
I will write it because there may be some people who will work with this pattern.
This is the second case.
Pip install cannot be done (error: command'gcc' failed with exit status 1)
Now download and install Xcode and then try again
pip install mysqlclient
Run.
Then
ld: library not found for -lssl linker command failed with exit code 1 (use -v to see invocation)
And the error changes. Apparently it's because I didn't go through the path
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
Execute.
After that, I tried to install it again and it succeeded. Yeah, I was worried about it, but I'm glad I was able to solve it safely.
Recommended Posts