SQLAlchemy and PyMySQL
Posted: Sat Sep 19, 2020 9:54 am
I am trying to use these to make connections and update a database. While I'm on the same network as my database, they work with no issue. But when they exist on different networks, PyMySQL tries to make use of the Cryptography package.
Normally I'd just `pip install cryptography` and be on my way. But seeing as how we don't have pip, I'm not so fortunate. On my local Windows machine, I can just take /sites-package/cryptography and drop it in addons/source-python/packages/site-packages/ and it works. However on a remote Windows server, I get this error:
I'm not exactly sure why I can't reproduce this locally. However I'm all ears for another solution. I would have tried MySQL.connector but again, the pip issue.
Normally I'd just `pip install cryptography` and be on my way. But seeing as how we don't have pip, I'm not so fortunate. On my local Windows machine, I can just take /sites-package/cryptography and drop it in addons/source-python/packages/site-packages/ and it works. However on a remote Windows server, I get this error:
Code: Select all
c_key(public_key, default_backend())
File "..\addons\source-python\packages\site-packages\cryptography\hazmat\backends\__init__.py", line 15, in default_backend
from cryptography.hazmat.backends.openssl.backend import backend
File "..\addons\source-python\packages\site-packages\cryptography\hazmat\backends\openssl\__init__.py", line 7, in <module>
from cryptography.hazmat.backends.openssl.backend import backend
File "..\addons\source-python\packages\site-packages\cryptography\hazmat\backends\openssl\backend.py", line 117, in <module>
from cryptography.hazmat.bindings.openssl import binding
File "..\addons\source-python\packages\site-packages\cryptography\hazmat\bindings\openssl\binding.py", line 15, in <module>
from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: DLL load failed: The specified module could not be found.
I'm not exactly sure why I can't reproduce this locally. However I'm all ears for another solution. I would have tried MySQL.connector but again, the pip issue.