The question is published on by Tutorial Guruji team.
I am getting the following error:
Traceback (most recent call last): File "drayd.py", line 2, in <module> from fabric.api import * **ImportError: No module named fabric.api**
I am runnign my program using:
These are my imports :
import os,pprint from fabric.api import * import time import argparse import ConfigParser
I dont have a file named fabric as other answers solution was, I installed fabric using pip but it still doesnt work,any suggestions? I am using the OSX Terminal.
NOTE : I realised that fabric I installed is not linked to python installation ie it does not recognise that fabric is installed by pip. I am using the python version 2.7 default by osx How do I link fabric installation to python?
The answer to my question is right here :
I had to add the location of my packages( which were installing not in the sys.path) so I had to add them manually
pip show to find location of the packages and add them to
as @Javier Buzzi said I will take the advice and also run my python code from virtualenv.