对于下载python包时必须使用上述命令的情况,我有点困惑。我试图根据这个问题的答案下载一个名为 pyudev 的包。我执行了这个命令:
sudo pip install python-pyudev
Run Code Online (Sandbox Code Playgroud)
但收到以下消息:
Downloading/unpacking python-pyudev
Could not find any downloads that satisfy the requirement python-pyudev
Cleaning up...
No distributions at all found for python-pyudev
Storing complete log in /home/vineet/.pip/pip.log
Run Code Online (Sandbox Code Playgroud)
但是以下工作正常:
sudo apt-get install python-pyudev
Run Code Online (Sandbox Code Playgroud)
什么时候apt-get应该用于安装包,什么时候python-pip使用?
如果我不小心pip install使用了apt-get预先安装的软件包,会发生什么?我是否只需使用最新版本(即可能是我使用 安装的版本pip)?反过来会发生什么?
注意:我不在虚拟环境中使用 Python(只是因为我不知道为什么我应该使用 Python 作为数据分析工具,并且主要尝试使用所有内容的最新版本)。