“Spyder Python | No module named pip” 翻译为 “Spyder Python | 未找到 pip 模块”。

huangapple go评论76阅读模式
英文:

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 "à".

英文:

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 Ó.

答案1

得分: 0

看起来可能是你的Python安装或环境出了问题。

首先,请检查Python是否已安装并添加到系统路径。可以通过在命令提示符中输入python来验证。如果收到错误消息,指示Python未被识别为命令,可能需要将其添加到系统路径中。

如果仍然遇到问题,可以尝试使用virtualenv/conda创建新的虚拟环境,并在该环境中安装customtkinter,以隔离Python环境并避免与其他软件包或系统设置发生冲突。

重要注意事项是,在使用conda env时,需要使用conda命令而不是pip来安装模块。

conda install -c anaconda spyder

https://anaconda.org/anaconda/spyder

英文:

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

huangapple
  • 本文由 发表于 2023年4月17日 06:21:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/76030613.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定