Pip安装错误不在正确版本的Python上

2024-10-01 09:16:43 发布

您现在位置:Python中文网/ 问答频道 /正文

enter image description here

我正试图通过python 3.8上的pip install安装Pandas,但终端试图使用我计算机上的pipfrom python 3.9,尽管我认为我删除了python 3.9文件夹中的所有内容。作为参考,3.83.9如下所示:

enter image description here

enter image description here

Python3.9/Scripts下,有一个python 3.9的pip安装程序。如果我只是从python 3.9中删除libscripts文件夹,pip安装程序会自动默认为3.8

谢谢


Tags: installpip文件夹终端内容pandaslib计算机
2条回答

简单的方法是从Windows环境变量中删除python3.9

最好的方法是在自定义Python版本中使用VirtualENV

1.-安装VirtualEnv 2.-使用特定的Python版本在终端中创建ENV

virtualenv venv -p=/c/Programs/Python/Python38/python.exe

3.-使用

source venv activate

现在,您的安装已被隔离

我修复了我的问题,我只需要删除包含lib和script的整个python3.9文件夹

相关问题 更多 >