bower install git Hacks

Bower install from a forked repository

If for any reason you need to fork a repo and want to install your forked version using Bower, follow these steps:

  1.  Fork the repository
  2. Clone the forked repo on your computer
  3. Make desired changes
  4. Increment version number in bower.json (create one if none exists e.g. 4.0.1)
  5. Commit and push
  6. Create a new version tag higher than that of the forked repository. If version tag from respository is 4.0.1, increase it. e.g. 4.0.2 :
     $ git tag "4.0.2" 
  7.  push tag :
    $ git push --tag 
  8. Install in your app using bower:
     $ bower install 
Fixes Hacks

virtualenv for python3

Simple steps to setup virtualenv for Python3

To setup virtualenv for python3 for Django projects, create and cd into the desired folder for the Django project.

Create a folder for virtualenv, eg mkdir venv

$ cd venv // The created folder for virtualenv 

Then run these commands worked for me in this order:

$ virtualenv -p python3 . // setup virtualenv with python3 fin current directory 
$ source bin/activate // ativate virtualenv 

At this point, checking python version will give python3

Install Django:

$ pip install django 

To see all installations run :

$ pip freeze //Django should be included in the list of installations 

Start Django project

$ django-admin startproject --projectname 

cd into created project and run:

$ python runserver 

More on virtualenv



Fixes Hacks

Fix IOError: [Errno 2] No such file or directory error for appdirs

Appdirs is a small Python module for determining appropriate platform-specific dirs, e.g. a “user data dir”.

Github repo –

This error from my experience occurred when I updated my local branch from origin and ran pip install to get the latest installed packages.

pip tried to upgrade appdir but it failed for some unknown reasons, then the error came up:

IOError: [Errno 2] No such file or directory: ‘/.local/lib/python2.7/site-packages/appdirs-1.4.0.dist-info/METADATA’

What worked for me was running

$ pip install appdirs --upgrade 
$ pip install -r requirements.txt --upgrade 

The issue was addressed here: