Saturday, November 14, 2015

'Missing' Python 3 Package After Installation using pip3 in Ubuntu 15.10

I am working on a project related to Google Maps, and interested to use polyline package. My system is Ubuntu 15.10 (just recently upgraded). And as usual, I use pip3 to do the job:

root@Kirana:/usr/lib/python3/dist-packages# pip3 install polyline
Downloading/unpacking polyline
  Downloading polyline-1.1.tar.gz
  Running setup.py (path:/tmp/pip-build-l9ch5_49/polyline/setup.py) egg_info for package polyline
    
Requirement already satisfied (use --upgrade to upgrade): six==1.8.0 in /usr/local/lib/python3.5/dist-packages (from polyline)
Installing collected packages: polyline
  Running setup.py install for polyline
    
Successfully installed polyline
Cleaning up...


Thursday, November 5, 2015

Virtual Environment in Python: virtualenv, pyenv, venv?

As you might already know, virtual environment is a nice way to create isolated environment needed for our project from the Python main installation. In this way, we can keep our main installation clean and not bloated with unused packages after the project concluded.

However, it is a little bit confusing  on what is the better way to create the virtual environment. Based on my research, at least three words come out: virtualenv, pyenv, and venv. What are they, and which one should I use?