VENV激活后,Python PIP引用了全局路径
我已经安装了新的MX-Linux。我的PC包含1个SSD,其中安装了OS和1个HDD,我一直将项目以及其他一般性物品(照片等)进行。现在,我遇到的问题是,当我在硬盘驱动器中的任何项目中创建一个新的虚拟环境时,它都已经安装了所有的全球依赖关系,无论它是否具有我所需的项目所需的依赖项,它都会' LL无法运行。在此
我跑了Windows,Fedora,Mint和现在的MX。以前从未有这个问题,我在网上找不到任何相关的问题,谢谢。
(venv) mx-linux@mx:/media/seconddrive/python-project/typer
$ which python
/media/seconddrive/python-projects/typer/venv/bin/python
$ which pip
/usr/bin/pip
I've a fresh installed MX-Linux. My PC contains 1 SSD with the OS installed and 1 HDD where I've always had my projects along with other general stuff (Photos etc..). Now the issue I'm having is that when I create a new virtual environment in any project inside my hard drive, it comes with all the global dependencies installed already and no matter if it has the dependencies a said project of mine requires, it'll fail to run. In this screenshot at the top you will find how my venv looks like when I create it in my SSD (Which is how it is expected and works properly) and at the bottom how it looks when I create in inside my HHD. You see, the problem is that even after venv is activated, the pip path points to the global instead of the venv's
I've ran windows, fedora, mint and now MX. Never had this issue before and I can't find anything related online, thanks..
(venv) mx-linux@mx:/media/seconddrive/python-project/typer
$ which python
/media/seconddrive/python-projects/typer/venv/bin/python
$ which pip
/usr/bin/pip
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论