neo
neo

Reputation: 1009

Executing Fabric python code on windows 7

I am trying to import fabric to use for my version of python, 3.3 with below code:

fabfile.py

from fabric.api import *

def hello():

    print("Hello world!")

But While executing ( C:> fab hello )it gives following error message.

from operator import isMappingType

ImportError:cannot import name isMappingType

I am having Python version : 3.3.2 win32.I installed related package as mentioned on the below web-link:

http://ridingpython.blogspot.in/2011/07/installing-fabric-on-windows.html

Any idea how this can be fixed?

Thanks in advance!

Upvotes: 3

Views: 1335

Answers (2)

rilutham
rilutham

Reputation: 501

try to install paramiko, ecdsa, and pycrypto

pip install paramiko
pip install ecdsa
pip install pycrypto

Upvotes: 0

neo
neo

Reputation: 1009

Fabric requires Python version 2.5 or 2.6. Fabric has not yet been tested on Python 3.x and is thus likely to be incompatible with that line of development.

It's not so simple to install Fabric on Windows, because it uses some specific C libs that needs to be compiled. Try next in Windows:

pip install fabric # Failed!

easy_install fabric # Failed again!

But if you don't want to install Visual Studio or Cygwin and compile the C code so I will consider another way, more simple. As I have figured out, Fabric needs next Python libs to be installed on Windows:

  1. PyCrypto
  2. PyWin32

Both requires compilation OR may be installed from the pre-built binary packages (my choice!):

PyCrypto: click here PyWin32: click here Download and install these two and you will be finally able to do:

pip install fabric # Success!

Upvotes: 2

Related Questions