简体   繁体   English

Python和Fabric版本兼容性

[英]Python and Fabric Version compatibility

I wrote a couple Python scripts that use Fabric which work on my laptop although when I recently shared it to my teammates they cannot fun the same file. 我编写了一些使用Fabric的Python脚本,这些脚本可以在笔记本电脑上使用,尽管最近与队友共享时,他们无法使用同一文件。 They are able to run normal Python files but it does not seem to be picking up fabric. 他们能够运行普通的Python文件,但似乎无法使用Fabric。 We both have Macbook OS X laptops and have Python 2.7. 我们都有Macbook OS X笔记本电脑和Python 2.7。

My Fabric and Paramiko versions are: 我的Fabric和Paramiko版本是:

Myhost$ fab -V
Fabric 1.10.2
Paramiko 1.15.3

While my coworker has and he is getting the below error when he tries to execute my fabric file: 当我的同事有并且他尝试执行我的结构文件时,出现以下错误:

Coworker$ fab -V
Fabric 1.13.1
Paramiko 2.1.1


$ python install.py
Traceback (most recent call last):
File "install.py", line 1, in <module>
from fabric.api import *
ImportError: No module named fabric.api

Does anyone know if these versions is causing this issue? 有谁知道这些版本是否引起此问题?

These are the commands we ran on his Macbook to install fabric: 这些是我们在他的Macbook上运行的用于安装结构的命令:

1.) sudo easy_install pip
2.) pip install fabric
3.) pip install PyCrypto
4.) pip install -U pip setuptools
5.) pip install paramiko

Your coworker could specify the version of fabric he would use by typing 您的同事可以通过键入来指定要使用的面料版本

pip install fabric==1.10.2

Which ensures you both have the same version! 这样可以确保你们拥有相同的版本!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM