简体   繁体   中英

How to install packages in debian whitout sudo permission?

I want to up a django server on a shared-hosting domain (debian/jessie). I don't have root permission, so i can-t execute "apt-get install package". I success to run a virtualenv but i need to install some common package to run django successfully.

-libssl-dev -openssl -build-essential -python-dev -libmysqlclient-dev

I hope someone can help me

If you're using a virtualenv, you can install Django 'inside' the virutalenv using the pip tool, and it will become available when you are running the virtual environment.

You have 2 choices, which you can do while running the virutalenv :

Either install packages one by one, with pip install *package name*

Or create a .txt file named for example requirements.txt, fill up that file with your requirements, for example (the numbers are the version you want):

Django==1.9.10
MySQL-python==1.2.5
Pillow==2.3.2
six==1.10.0

and then run pip install -r requirements.txt so that pip installs all those packages at once, also making it very easy to replicate on another machine.

Hope this helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM