添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
谦虚好学的石榴  ·  PyQt/QTextEdit/Highlig ...·  2 周前    · 
完美的馒头  ·  python QTreeWidget ...·  1 周前    · 
高大的卤蛋  ·  Prevent Cross-Site ...·  1 周前    · 
多情的仙人球  ·  Spark(一) | Learner·  1 月前    · 
风度翩翩的创口贴  ·  paper ...·  5 月前    · 
独立的胡萝卜  ·  Cloning Medium with ...·  8 月前    · 

I used to be able to use pip to install python modules in my home directory, but this is not working anymore:

$ python -V
Python 3.10.2
$ python -m pip install FOO
/usr/bin/python: No module named pip

pip module should be installed by default. If it’s missing, I guess it’s because Fedora packagers decided to remove it, right? I’m curious to know the motivations.
I’m using Fedora 35 Silverblue.

Eventually I’ve installed python3-pip in a toolbox container and installed the module there.

I don’t have Silverblue-specific experiences, but in the Workstation, it is intended to install pip independently with dnf install pip and then you can use it independently with, e.g., pip install cryptography. Then, modules will be available in the Python interpreter. But it won’t be installed by default, and as far as I remember, this has never been different. Btw, many Python modules are independently available in the Fedora repo, not depending on pip (e.g., cryptography as python3-cryptography)

sgtnasty:

As far as I can remember pip was never packaged with python because some pip installs require the dev libs too (python-dev) which adds more files etc. This goes even back to Python 2.

Now I remember… I downloaded get-pip.py to install it locally, as described here:
https://packaging.python.org/en/latest/tutorials/installing-packages/#ensure-you-can-run-pip-from-the-command-line

fedelibre:

pip module should be installed by default. If it’s missing, I guess it’s because Fedora packagers decided to remove it, right? I’m curious to know the motivations .

The main motivation to limit packages in an installation media is the size of the installation media. Your use case may require pip, and so you may want pip to be installed by default, but given that it’s easily installable from the repositories, it does not need to be included in the default installation media. By default, the Python interpreter is included in the installation image because a number of tools require it (dnf for example).