[CONPY-181] macos BigSur 11.5.1 error import mariadb Created: 2021-12-01 Updated: 2021-12-04 Resolved: 2021-12-04 |
|
| Status: | Closed |
| Project: | MariaDB Connector/Python |
| Component/s: | Installation |
| Affects Version/s: | 1.0.6 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | DMITRII BOLKHOVSKII | Assignee: | Georg Richter |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Environment: |
macos BigSur 11.5.1 (MacBook M1), |
||
| Attachments: |
|
| Python Version: | python 3.8.0 |
| Description |
|
Hello! Please help fix |
| Comments |
| Comment by Georg Richter [ 2021-12-01 ] | ||||||||||||||||||||||||
|
Did you follow the instructions from MariaDB Connector/Python documentation and installed Connector/C ? | ||||||||||||||||||||||||
| Comment by DMITRII BOLKHOVSKII [ 2021-12-02 ] | ||||||||||||||||||||||||
| Comment by DMITRII BOLKHOVSKII [ 2021-12-02 ] | ||||||||||||||||||||||||
|
Yes, I think I have followed all the instructions: In the code, python directly added the path to the folder, however, the error repeats import sys | ||||||||||||||||||||||||
| Comment by Georg Richter [ 2021-12-02 ] | ||||||||||||||||||||||||
|
It looks like mariadb module can't load Connector/C. | ||||||||||||||||||||||||
| Comment by Georg Richter [ 2021-12-02 ] | ||||||||||||||||||||||||
|
Just checked installation on a MacBox:
| ||||||||||||||||||||||||
| Comment by DMITRII BOLKHOVSKII [ 2021-12-03 ] | ||||||||||||||||||||||||
|
MariaDB solving problem Last login: Fri Dec 3 14:10:53 on ttys000 bolkhovskiydmitriy@MBP-Bolkhovskiy ~ % which mariadb_config bolkhovskiydmitriy@MBP-Bolkhovskiy ~ % mariadb_config --libs bolkhovskiydmitriy@MBP-Bolkhovskiy ~ % pip3 install mariadb --no-cache-dir I decided to uninstall mariadb: bolkhovskiydmitriy@MBP-Bolkhovskiy ~ % pip3 uninstall mariadb
bolkhovskiydmitriy@MBP-Bolkhovskiy ~ % python3 -c "import mariadb; print(mariadb._version_)" Then I created a similar script and ran it from the command line. Everything worked !!! bolkhovskiydmitriy@MBP-Bolkhovskiy experiments % python3 mariadb_exp.py But when I run the same script directly from PyCharm - it gives the same error PyCharm 2021.2.3 (Community Edition) ____________- /usr/local/bin/python3.8 /Users/bolkhovskiydmitriy/PythonData/aVision/CamGroup02/experiments/mariadb_exp.py Process finished with exit code 1 | ||||||||||||||||||||||||
| Comment by DMITRII BOLKHOVSKII [ 2021-12-03 ] | ||||||||||||||||||||||||
|
It turned out python 3.8 is not friendly with macOS m1 arm. Installed python 3.10 - everything worked. Problem solved, thanks a lot! |