Can someone help me please?
I'm trying to run at my Mac a Python automation tests using PyTest in my venv environment but having such an error:
Library not loaded: /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib
I've tried to reinstall openssl:
brew reinstall openssl@1.1
..........
A CA file has been bootstrapped using certificates from the system keychain. To add additional certificates, place .pem files in /opt/homebrew/etc/openssl@1.1/certs
and run /opt/homebrew/opt/openssl@1.1/bin/c_rehash
openssl@1.1 is keg-only, which means it was not symlinked into /opt/homebrew, because macOS provides LibreSSL.
If you need to have openssl@1.1 first in your PATH, run: echo 'export PATH="/opt/homebrew/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc
For compilers to find openssl@1.1 you may need to set: export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib" export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"
I did what was suggested above:
echo 'export PATH="/opt/homebrew/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"
echo $PATH
/Users/danylokholodov/Documents/my-project/Core_Platform/Code/my-project-qa-framework/venv/bin:/opt/homebrew/opt/openssl@1.1/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands
which openssl
/opt/homebrew/opt/openssl@1.1/bin/openssl
But still have the same error during executing tests:
../../../venv/lib/python3.9/site-packages/pymssql/__init__.py:3: in <module>
from ._pymssql import *
E ImportError: dlopen(/Users/danylokholodov/Documents/my-project/Core_Platform/Code/my-project-qa-framework/venv/lib/python3.9/site-packages/pymssql/_pymssql.cpython-39-darwin.so, 2): Library not loaded: /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib
E Referenced from: /Users/danylokholodov/Documents/my-project/Core_Platform/Code/my-project-qa-framework/venv/lib/python3.9/site-packages/pymssql/_pymssql.cpython-39-darwin.so
E Reason: image not found