Custom Search

Friday, December 9, 2016

How to fix python pip not installing package to virtualenv site-packages

1)
(myenv) saju@ubuntu:~$ sudo pip install -t /home/saju/myenv/lib/python2.7/site-packages django-localflavor

Use -t option

2)
(myenv) saju@ubuntu:~$ python
Python 2.7.12 (default, Jul  1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import localflavor

How to fix python pip installing package in global dist-packages instead of virtualenv

1)
(myenv) saju@ubuntu:~$ sudo pip install -t /home/saju/myenv/lib/python2.7/site-packages django-localflavor

Use -t option

2)
(myenv) saju@ubuntu:~$ python
Python 2.7.12 (default, Jul  1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import localflavor

How to pip install python package into a specific directory

1)
(myenv) saju@ubuntu:~$ sudo pip install -t /home/saju/myenv/lib/python2.7/site-packages django-localflavor

Use -t option

2)
(myenv) saju@ubuntu:~$ python
Python 2.7.12 (default, Jul  1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import localflavor

Tuesday, December 6, 2016

Install these packages without verification? [y/N]

$ sudo apt-key update
$ sudo apt-get update



How to python pip download source code of package in tar file format


$pip install celery -d /home/saju/Downloads/test --no-use-wheel

Extract this tar file and build Debian file from it