fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ModuleNotFoundError: No module named 'fabric.api'


From: Kaushal Shriyan
Subject: Re: ModuleNotFoundError: No module named 'fabric.api'
Date: Thu, 15 Apr 2021 18:50:12 +0530


On Thu, Apr 15, 2021 at 6:05 PM Kaushal Shriyan <kaushalshriyan@gmail.com> wrote:
Hi,

$fab -V
Fabric 2.6.0
Paramiko 2.7.2
Invoke 1.5.0

I have this fabfile.py http://sprunge.us/IfF1Ju. when I run fab check, I am seeing this issue ModuleNotFoundError: No module named 'fabric.api'

Any examples which relate to fabric2.x for the fabfile.py http://sprunge.us/IfF1Ju. Thanks in advance. I look forward to hearing from you. 

Best Regards,

Kaushal

Hi,

I did the below using python command line

$fab -V
Fabric 2.6.0
Paramiko 2.7.2
Invoke 1.5.0

$python3.9
Python 3.9.0 (v3.9.0:9cf6752276, Oct  5 2020, 11:29:23)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from fabric import Connection
>>> connection = {"host": "192.168.0.188", "user": "root", "port": 22, "connect_kwargs": {"password":"test@#!123"}}
>>> result = connection.run('uname -a')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'dict' object has no attribute 'run'
>>> 

Please correct me if I am missing anything. Thanks in advance. I look forward to hearing from you. 

Best Regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]