How to use sudo pip with ubuntu end user permissions???

Asked 2 years ago, Updated 2 years ago, 88 views

I'm working on Python in ubuntu.

On the online server, I installed Python 3.5 on ubuntu and installed necessary packages such as python pipes. However, during the installation process, I installed it as sudo and moved it to the closed network.

$ sudo pip list makes pip work, but if I just run it with pip, there is an error that there is no pip module...

How can I just use pip and pip installed packages from user permissions?

python ubuntu python3.6 python3.5

2022-09-20 20:13

3 Answers

I usually create a separate virtual environment with venv or virtualenv, activate that virtual environment, and then pip open the necessary packages in the virtual environment.


2022-09-20 20:13

Configure your environment by referring to pyenv... https://github.com/pyenv/pyenv It's good to refer to it.


2022-09-20 20:13

https://stackoverflow.com/questions/7465445/how-to-install-python-modules-without-root-access

I think that's the answer you want.

pip install --user package_name

I can do it like this.


2022-09-20 20:13

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.