简体   繁体   English

如何在 Linux 上安装软件包,用于 Python 2 与 pip 安装 ZA7F5F354213B9274117393 时

[英]How to install packages on Linux for Python 2 with pip when Python 3 is installed

I'm trying to install a package for python 2 using pip, however it defaults to installing for python 3. The script I need to run only works in python 2.7, which i do have installed alongside python 3. The pip-2.7 command does not exist, nor pip2. I'm trying to install a package for python 2 using pip, however it defaults to installing for python 3. The script I need to run only works in python 2.7, which i do have installed alongside python 3. The pip-2.7 command does不存在,pip2也不存在。 Is there a way besides that to directly install the package?除此之外还有什么办法可以直接安装package? (hexdump, btw if that helps). (hexdump,顺便说一句,如果有帮助的话)。

Did you checked if Python2 is installed?您是否检查过是否安装了 Python2?

Did you tried pip2 command?您是否尝试过pip2命令?

What's the result if you do which pip ?如果你执行which pip什么结果?

if pip2 or pip2.7 don't work, you can try /usr/bin/pip2 or /usr/bin/pip2.7如果 pip2 或 pip2.7 不起作用,您可以尝试/usr/bin/pip2/usr/bin/pip2.7

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM