Nov-20-2021, 03:57 AM
Is this the correct output for a working MySQL connector within Python 3.9.9?
Source Blogs/Tutorials (Google Found):
https://tecadmin.net/how-to-install-pyth...-debian-9/
https://stackoverflow.com/questions/6274...amed-mysql
brandon@FireDragon:~/Python/sgml.bs4$ python w3.mysql.python.connector.py <mysql.connector.connection.MySQLConnection object at 0x7fb325cfcac0> brandon@FireDragon:~/Python/sgml.bs4$Updated to 3.9.9 from source per the following Blogs/Tutorials:
Source Blogs/Tutorials (Google Found):
https://tecadmin.net/how-to-install-pyth...-debian-9/
https://stackoverflow.com/questions/6274...amed-mysql
apt update apt upgrade apt install wget build-essential libreadline-gplv2-dev libncursesw5-dev \ libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev wget https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tgz tar xzf Python-3.9.9.tgz cd Python-3.9.9 ./configure --enable-optimizations
error output : fi WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151> distutils: /usr/local/include/python3.9/UNKNOWN sysconfig: /root/Python-3.9.9/Include/UNKNOWN WARNING: Additional context: user = False home = None root = '/' prefix = None Looking in links: /tmp/tmpi00_y1xa Processing /tmp/tmpi00_y1xa/setuptools-58.1.0-py3-none-any.whl Processing /tmp/tmpi00_y1xa/pip-21.2.4-py3-none-any.whl Installing collected packages: setuptools, pip WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151> distutils: /usr/local/include/python3.9/setuptools sysconfig: /root/Python-3.9.9/Include/setuptools WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151> distutils: /usr/local/include/python3.9/pip sysconfig: /root/Python-3.9.9/Include/pip Successfully installed pip-21.2.4 setuptools-58.1.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv root@FireDragon:~/Python-3.9.9#
root@FireDragon:~/Python-3.9.9# python3.9 -V Python 3.9.9 root@FireDragon:~/Python-3.9.9#
pip3.9 -V pip 21.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
nano -c /home/brandon/.bashrc added the following 2 lines and saved: alias python=python3.9 alias pip=pip3.9
brandon@FireDragon:~/Python/sgml.bs4$ python -V Python 3.9.9 brandon@FireDragon:~/Python/sgml.bs4$ ./w3.mysql.python.connector.py bash: ./w3.mysql.python.connector.py: Permission denied brandon@FireDragon:~/Python/sgml.bs4$ python w3.mysql.python.connector.py Traceback (most recent call last): File "/home/brandon/Python/sgml.bs4/w3.mysql.python.connector.py", line 1, in <module> import mysql.connector ModuleNotFoundError: No module named 'mysql' brandon@FireDragon:~/Python/sgml.bs4$
brandon@FireDragon:~/Python/sgml.bs4$ pip install mariadb Defaulting to user installation because normal site-packages is not writeable Collecting mariadb Downloading mariadb-1.0.8.zip (85 kB) |████████████████████████████████| 85 kB 503 kB/s Using legacy 'setup.py install' for mariadb, since package 'wheel' is not installed. Installing collected packages: mariadb Running setup.py install for mariadb ... done Successfully installed mariadb-1.0.8 WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available. You should consider upgrading via the '/usr/local/bin/python3.9 -m pip install --upgrade pip' command. brandon@FireDragon:~/Python/sgml.bs4$ pip install mysql
brandon@FireDragon:~/Python/sgml.bs4$ pip install mysql Defaulting to user installation because normal site-packages is not writeable Collecting mysql Downloading mysql-0.0.3-py3-none-any.whl (1.2 kB) Collecting mysqlclient Downloading mysqlclient-2.1.0.tar.gz (87 kB) |████████████████████████████████| 87 kB 708 kB/s Using legacy 'setup.py install' for mysqlclient, since package 'wheel' is not installed. Installing collected packages: mysqlclient, mysql Running setup.py install for mysqlclient ... done Successfully installed mysql-0.0.3 mysqlclient-2.1.0 WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available. You should consider upgrading via the '/usr/local/bin/python3.9 -m pip install --upgrade pip' command. brandon@FireDragon:~/Python/sgml.bs4$
brandon@FireDragon:~/Python/sgml.bs4$ python w3.mysql.python.connector.py Traceback (most recent call last): File "/home/brandon/Python/sgml.bs4/w3.mysql.python.connector.py", line 1, in <module> import mysql.connector ModuleNotFoundError: No module named 'mysql' brandon@FireDragon:~/Python/sgml.bs4$ pip install mysql-connector Defaulting to user installation because normal site-packages is not writeable Collecting mysql-connector Using cached mysql-connector-2.2.9.tar.gz (11.9 MB) Using legacy 'setup.py install' for mysql-connector, since package 'wheel' is not installed. Installing collected packages: mysql-connector Running setup.py install for mysql-connector ... done Successfully installed mysql-connector-2.2.9 WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available. You should consider upgrading via the '/usr/local/bin/python3.9 -m pip install --upgrade pip' command. brandon@FireDragon:~/Python/sgml.bs4$
“And one of the elders saith unto me, Weep not: behold, the Lion of the tribe of Juda, the Root of David, hath prevailed to open the book,...” - Revelation 5:5 (KJV)
“And oppress not the widow, nor the fatherless, the stranger, nor the poor; and ...” - Zechariah 7:10 (KJV)
#LetHISPeopleGo
“And oppress not the widow, nor the fatherless, the stranger, nor the poor; and ...” - Zechariah 7:10 (KJV)
#LetHISPeopleGo