Categories
Python Answers

How to install python modules without root access with Python?

Spread the love

Sometimes, we want to install python modules without root access with Python.

In this article, we’ll look at how to install python modules without root access with Python.

How to install python modules without root access with Python?

To install python modules without root access with Python, we can set the package to install in a directory that we have write access to.

For instance, we run

pip install --install-option="--prefix=$HOME/local" package_name

to install the package_name package with the --install-option set to "--prefix=$HOME/local" to install the package in the local directory in the home directory.

Conclusion

To install python modules without root access with Python, we can set the package to install in a directory that we have write access to.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *