This is not a problem with Spyder. It is a problem because you are not referencing the connector from within your Python virtual environment correctly.
Did you install the MySQL connector into the Spyder environment where the interpreter lives? >From the Spyder iPython Console type the following commands to see what "environment" you are running Python in, and the full path to your Python.exe interpreter file. import sys sys.prefix sys.executable Then start a regular Windows console (or "terminal" if you are on Linux or MacOSX) and type activate base # This will activate your Python "base" environment if you installed Python using Anaconda. conda list # This will show all packages installed in your environment. or "pip list" This will show whether your MySQL / Python Connector is available in your environment. On Friday, April 21, 2023 at 3:08:03 PM UTC-4 johndou...@gmail.com wrote: > I am new to using Spyder, I find it is so easy to use, a lot of thought > has gone into it's design. However I have a problem with the Python > installed with Spyder. I am using Python with MySQL. When I run a program > with the first line "import mysql.connector" the program fails because it > can't find the MySQL/Python connector. > I have a previous installation of Python and the program works perfectly > with that Python. I tried reinstalling the MySQL/Python Connector, but that > made no difference. > Is there a way to make Spyder use the Python that works, or get Spyder to > see the connector? > > -- You received this message because you are subscribed to the Google Groups "spyder" group. To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/spyderlib/07fbacd1-cb49-4ac2-9c36-f6161f927e19n%40googlegroups.com.