Python Forum

Full Version: Debian 11 Bullseye | Python 3.9.x | pip install mysql-connector-python-rf problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Debian 11 Bullseye | Python 3.9.x | pip install mysql-connector-python-rf problems

I just installed a fresh Debian 11 Bullseye w/ Python 3.9.x

Installing my previous Python modules I only ran into 1 problem; mysql-connector-python-rf (which is what I need to properly continue my Python Journey).

The following is the error I receive in (root):

Error:
root@FireDragon:~# pip3 install mysql-connector-python-rf Collecting mysql-connector-python-rf Downloading mysql-connector-python-rf-2.2.2.tar.gz (11.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.9/11.9 MB 2.9 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Using legacy 'setup.py install' for mysql-connector-python-rf, since package 'wheel' is not installed. Installing collected packages: mysql-connector-python-rf Running setup.py install for mysql-connector-python-rf ... error error: subprocess-exited-with-error × Running setup.py install for mysql-connector-python-rf did not run successfully. │ exit code: 1 ╰─> [6 lines of output] usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: option --single-version-externally-managed not recognized [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> mysql-connector-python-rf note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure. root@FireDragon:~#

The following is the error I receive with my username (brandon):


Error:
brandon@FireDragon:~$ pip3 install mysql-connector-python-rf Defaulting to user installation because normal site-packages is not writeable Collecting mysql-connector-python-rf Downloading mysql-connector-python-rf-2.2.2.tar.gz (11.9 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.9/11.9 MB 3.0 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Using legacy 'setup.py install' for mysql-connector-python-rf, since package 'wheel' is not installed. Installing collected packages: mysql-connector-python-rf Running setup.py install for mysql-connector-python-rf ... error error: subprocess-exited-with-error × Running setup.py install for mysql-connector-python-rf did not run successfully. │ exit code: 1 ╰─> [6 lines of output] usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: option --single-version-externally-managed not recognized [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> mysql-connector-python-rf note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure. brandon@FireDragon:~$
Thank you everyone for this forum!

Best Regards,

Brandon Kastning
Since the problem clearly lies with the package mysql-connector-python-rf,
I'd contact the maintainer of the package (found here: https://pypi.org/project/mysql-connector-python-rf/ ) and send them the same info provided here

You may get an answer here as well, but perhaps sooner with maintainer.
Look at date of mysql-connector-python-rf 2017
Use the official update one mysql-connector-python or a alterative like PyMySQL( pure-Python MySQL client library).
Larz60,

Thank you for this answer! That's a great idea!

Best Regards,

Brandon!

(Feb-05-2022, 12:00 PM)Larz60+ Wrote: [ -> ]Since the problem clearly lies with the package mysql-connector-python-rf,
I'd contact the maintainer of the package (found here: https://pypi.org/project/mysql-connector-python-rf/ ) and send them the same info provided here

You may get an answer here as well, but perhaps sooner with maintainer.
snippsat,

I wonder why I had -rf package rather than "mysql-connector-python"; Thank you! I was able to find and install the package as follows:

I haven't tested it yet! If I run into a problem I won't hesitate to ask you! Thank you again!

Install:

root@FireDragon:~# pip3 install mysql-connector-python
Collecting mysql-connector-python
  Downloading mysql_connector_python-8.0.28-cp39-cp39-manylinux1_x86_64.whl (37.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 37.6/37.6 MB 2.6 MB/s eta 0:00:00
Collecting protobuf>=3.0.0
  Downloading protobuf-3.19.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 2.6 MB/s eta 0:00:00
Installing collected packages: protobuf, mysql-connector-python
Successfully installed mysql-connector-python-8.0.28 protobuf-3.19.4
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:~#
Best Regards,

Brandon!
(Feb-05-2022, 12:26 PM)snippsat Wrote: [ -> ]Look at date of mysql-connector-python-rf 2017
Use the official update one mysql-connector-python or a alterative like PyMySQL( pure-Python MySQL client library).