imwilsonxu/fbone

fab setup looking for python 3.4.1?

scheung38 opened this issue · 0 comments

I am in pyenv2.7.10:

(pyenv2.7.10) $ fab setup
[] Executing task 'setup'
[localhost] local: virtualenv env
/bin/sh: /usr/local/bin/virtualenv: /usr/local/Cellar/python3/3.4.1/Frameworks/Python.framework/Versions/3.4/bin/p: bad interpreter: No such file or directory

Fatal error: local() encountered an error (return code 126) while executing 'virtualenv env'

Aborting.

Why is it looking for Python3? Or it has to run with Python 3?

Then changed to Python 3.4.1, at least virtual env complain goes away but now

ImportError: cannot import name 'isMappingType'

I am confused with Python version to use

$ python2.7
>>> from operator import isMappingType
>>>

$ python3.4
>>> from operator import isMappingType
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'isMappingType'

This link says Fabric is not supported in Python 3?
http://stackoverflow.com/questions/29306752/fabric-import-error-cannot-import-name-ismappingtype

Also not sure why

from werkzeug import generate_password_hash, check_password_hash

cannot import generate_password_hash and check_password_hash.

EDIT werkzeug should be:

from werkzeug.security import generate_password_hash, check_password_hash

Helps if requirements.txt is there.