Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows + fab = ImportError: cannot import name output #194

Closed
bitprophet opened this issue Aug 19, 2011 · 6 comments
Closed

Windows + fab = ImportError: cannot import name output #194

bitprophet opened this issue Aug 19, 2011 · 6 comments

Comments

@bitprophet
Copy link
Member

Description

Getting the following when trying to do anything with Fabric. This same fabfile.py that I'm using works just fine on Linux and Mac. I've got Paramiko and PyCrypto installed. Python 2.6 amd64, Windows 7 64-bit, Fabric 0.9.1. Any help would be greatly appreciated. I think there were a few other Windows users running into this, too.

(Here's another user with the same problem that is also a 64-bit guy)

(coursebook_env) C:\Users\Greg Taylor\workspace\coursebook>fab -l
Traceback (most recent call last):
File "C:\Users\Greg Taylor\workspace\coursebook_env\Scripts\fab-script.py", line 8, in <module>
load_entry_point('Fabric==0.9.1', 'console_scripts', 'fab')()
File "build\bdist.win-amd64\egg\pkg_resources.py", line 318, in load_entry_point
File "build\bdist.win-amd64\egg\pkg_resources.py", line 2221, in load_entry_point
File "build\bdist.win-amd64\egg\pkg_resources.py", line 1954, in load
File "C:\Users\Greg Taylor\workspace\coursebook_env\lib\site-packages\fabric\main.py", line 17, in <module>
from fabric import api # For checking callables against the API
File "C:\Users\Greg Taylor\workspace\coursebook_env\lib\site-packages\fabric\api.py", line 9, in <module>
from fabric.context_managers import cd, hide, settings, show
File "C:\Users\Greg Taylor\workspace\coursebook_env\lib\site-packages\fabric\context_managers.py", line 12, in <module>
from fabric.state import env, output
File "C:\Users\Greg Taylor\workspace\coursebook_env\lib\site-packages\fabric\state.py", line 9, in <module>
from fabric.network import HostConnectionCache
File "C:\Users\Greg Taylor\workspace\coursebook_env\lib\site-packages\fabric\network.py", line 19, in <module>
abort("paramiko is a required module. Please install it:\n\t$ sudo easy_install paramiko")
File "C:\Users\Greg Taylor\workspace\coursebook_env\lib\site-packages\fabric\utils.py", line 21, in abort
from fabric.state import output
ImportError: cannot import name output
(coursebook_env) C:\Users\Greg Taylor\workspace\coursebook>

Originally submitted by Greg Taylor (gtaylor) on 2010-07-14 at 01:27pm EDT


Closed as Worksforme on 2011-05-23 at 09:18am EDT

@ghost ghost assigned bitprophet Aug 19, 2011
@bitprophet
Copy link
Member Author

Jeff Forcier (bitprophet) posted:


(Tweaked description formatting a bit...)

Going by your traceback you don't seem to have Paramiko installed, and it's possible that the abort call is running into additional problems due to that. Can you install Paramiko and then see if it works? (I'll still take the "blows up real good instead of displaying nice useful message, when Paramiko not installed" issue aside, though, if that's the case.)


on 2010-07-14 at 01:30pm EDT

@bitprophet
Copy link
Member Author

Jeff Forcier (bitprophet) posted:


The SO link is also probably the same issue, though his rather unhelpfully truncated traceback makes it hard to tell.


on 2010-07-14 at 01:31pm EDT

@bitprophet
Copy link
Member Author

Greg Taylor (gtaylor) posted:


Digging deeper, looks like Paramiko installed, as did its PyCrypto dependency. It looks like it failed to install a PyCrypto dependency, but marked everything as OK. Looks like winrandom is missing or built for a different environment.

This isn't Fabric's problem, so it's safe to close this.


on 2010-07-14 at 02:19pm EDT

@bitprophet
Copy link
Member Author

Jeff Forcier (bitprophet) posted:


OK, thanks for checking (and submitting the report here instead of just posting it on SO like some people do :)).

If you find something with your setup that seems like a common hang-up that might deserve mention in the install docs, please let me know.


on 2010-07-14 at 04:43pm EDT

@bitprophet
Copy link
Member Author

Greg Taylor (gtaylor) posted:


I guess the real problem to note here is that on 64 bit Python, you're S.O.L. for a 64bit precompiled winrandom. Rather than let the user know this, pip merrily chugs along as PyCrypto says it installs just fine (whereas it really doesn't, winrandom just never gets tested). If you have MS Visual Studio, this link seems to suggest that it will compile this for you.

So meh. Unless you have a compiler, you need to wait until someone compiles a 64bit winrandom and packages it. Otherwise, install MS Visual C++ and compile it yourself (pain).


on 2010-07-14 at 04:49pm EDT

@bitprophet
Copy link
Member Author

Andi Albrecht (andialbrecht) posted:


FWIW, I came across this issue today and had some problems even with PyCrypto and winrandom installed before installing fabric/paramiko. The first error was the traceback reported in the first post. But then "ImportError: No module named OSRNG" occured when paramiko tries to "from Crypto import Random". For me it worked after downgrading pyCrypto from 2.3 to 2.1 on 32bit windows.


on 2011-05-23 at 09:18am EDT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant