Search code examples
pythonpipmodulespyder

Spyder Python | No module named pip


Everytime I try to enter any pip commands on spyder "IPython Console" it gives me back this error message :

Note: you may need to restart the kernel to use updated packages.
D:\Spyder\Python\python.exe: No module named pip

and when I try to use pip3 to install it it gives me this message :

pip3 install customtkinter
  Cell In[3], line 1
    pip3 install customtkinter
         ^
SyntaxError: invalid syntax

I'm trying to install customtkinter which can be found on the following link : "https://github.com/TomSchimansky/CustomTkinter"

I tried uninstalling and reinstalling Python and Spyder. I downloaded get-pip.py and did what was asked with it. I tried setting an environnement with miniconda. I tried changing the environnement variables and installing python both via the installer and via the Microsoft Store. I tried python -m ensurepip If I try to do this command : Python get-pip.py in the cmd it gives me back the message in French : Python est introuvable. ExÚcutez sans argument pour procÚder Ó l which means Python cannot be found. Execute without argument to proceed to the and yes the sentence is indeed not finished I don't know why, it even has weird characters that shouldn't be in it such as Ú and Ó.


Solution

  • It does seem like an issue with your Python installation/environment.

    First of all, check if Python is installed and in your system path by opening a command prompt and typing python. If you get an error message saying that Python is not recognized as a command, you may need to add it to your system path.

    If you're still having issues, you may want to try creating a new virtual environment using virtualenv/conda, and installing customtkinter in that environment. This will help isolate your Python environment and avoid conflicts with other packages or system settings.

    IMPORTANT Thing to note here is that when you use conda env, you need to use conda commands to install modules and not pip

    conda install -c anaconda spyder

    https://anaconda.org/anaconda/spyder