Remember an error when installing a pip package under Linux and the strange solution process

1. Problem description

As shown in the figure, when using pip to install the speed test tool speedtest-cli, the terminal prompts "Externally managed environment", resulting in the inability to install the library.
Insert image description here

2. Problem solving

1. Try the solution suggested and use the command apt install python3-xxx instead to install: the
Insert image description here
terminal prompts that the package cannot be located and cannot be installed:
Insert image description here
2. According to another method in the prompt, first install the pipx tool and use the pipx tool to install it:
Insert image description hereas shown in the figure , the terminal prompts that the installation is complete, but the relevant command is still not found:
Insert image description here
3. Um, just apt install and it is over. This method is not included in the official documents, so I went around and came back. :
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_43031313/article/details/133210250