![]() After some research and trial I found that changing ConfigParser to configparser worked for me but then I came across another issue. We can also check whether you have C extension installed on not by importing the _mysql_connector module rather than the nnector. I run kali linux- Rolling and I came across this problem ,when I tried running cupp.py in the terminal, after updating to python 3.6.0. The packages which have "cext" in their name come with C extension, while the rest of them are pure Python implementation. If this is not the case, you can download the Connector/Python package which comes with C Extension from the download page. If you have installed Connector/Python using pip on Linux then it is highly likely that the C extension is installed with the package. In version 2.1, the C extension was introduced, which allows better performance when dealing with large result sets as compared to pure Python implementation. Initially, MySQL Connector/Python was written in pure Python. If you get the version as indicated in the preceding snippet then you have a working Connector/Python installation. conda install -c conda-forge mysql-connector-python. Then I used the following conda command to install the mysql-connector-python package. ![]() I used this command to find the right conda package: conda search mysql-connector. Return _bootstrap._gcd_import(name, package, level)įile "", line 950, in _find_and_load_unlockedįile "", line 205, in _call_with_frames_removedįile "/var/task/application.py", line 6, in įile "/var/task/PIL/Image.Python 3.5.2 (default, Nov 17 2016, 17:05:23) on linux Type "help", "copyright", "credits" or "license" for more information. ModuleNotFoundError: No module named MySQLdb. ![]() Self.app_module = importlib.import_module(_MODULE)įile "/var/lang/lib/python3.6/importlib/_init_.py", line 126, in import_module Return LambdaHandler.lambda_handler(event, context)įile "/var/task/handler.py", line 237, in lambda_handlerįile "/var/task/handler.py", line 129, in _init_ However, I then ended up getting:įile "/var/task/handler.py", line 509, in lambda_handler Update: Interestingly enough, I tried using "use_precompiled_packages": false and no longer got ModuleNotFoundError: No module named 'mysql'. Spent a fair amount of time trying to get that to work before giving up. MySQL Connector not Working: NO module named Connector. Now that I moved it to a new server, it breaks. ![]() Relative imports - ModuleNotFoundError: No module named x. I have created this very simple script that connects with SQLAlchemy to a MySQL database and runs a SELECT statement. But every time I tried to do python setup.py sdist bdist_wheel I got error: invalid command 'bdist_wheel'. ModuleNotFoundError: No module named mysql even when module is installed. I thought that the issue might be related to Miserlou/Zappa#319, so I tried to create a wheel from the Platform Independent ZIP archive (from MySQL's download page). import nnector ModuleNotFoundError: No module named mysql I already install via pip3 mysql and mysql-connector and of course also call import nnector. I am running Zappa from a virtual environment and am using Python 3.6. I get the exact same issue, ModuleNotFoundError: No module named 'mysql' on Lambda (again, it works perfectly locally). I also tried uninstalling mysql-connector-python and instead installed mysql-connector-python-rf via pip install mysql-connector-python-rf. I'm installing mysql-connector-python from source URL: Everything works fine locally, the error only occurs on Lambda. I'm trying to use MySQL Connector/Python with Zappa but keep getting ModuleNotFoundError: No module named 'mysql' after deploying. Originally from: Miserlou/Zappa#1401 by jsahoo Context
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |