Error installing Sikuli in Python - python

I am trying to install Sikuli in Python. I have Python-3.4.1 32 bit on a Windows 7 64 bit machine.
When I execute the command:
pip.exe install sikuli
(pip.exe is installed in -> C:\Python34\Scripts)
It gives me the error:
Downloading/unpacking sikuli Running setup.py
(path:C:\Users\arun_m\AppData\Local\Temp\pip_build_arun_m\sikuli\setup.py)
egg_info for package sikuli
No local packages or download links found for jnius>=1.1-dev
Traceback (most recent call last):
File "", line 17, in
File "C:\Users\arun_m\AppData\Local\Temp\pip_build_arun_m\sikuli\setup.py",
line 39, in
'Development Status :: 4 - Beta'
File "C:\Python34\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "C:\Python34\lib\site-packages\setuptools\dist.py", line 239, in init
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "C:\Python34\lib\site-packages\setuptools\dist.py", line 263, in fetch_build_eggs
parse_requirements(requires), installer=self.fetch_build_egg
File "C:\Python34\lib\site-packages\pkg_resources.py", line 564, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "C:\Python34\lib\site-packages\pkg_resources.py", line 802, in best_match
return self.obtain(req, installer) # try and download/install
File "C:\Python34\lib\site-packages\pkg_resources.py", line 814, in obtain
return installer(requirement)
File "C:\Python34\lib\site-packages\setuptools\dist.py", line 313, in fetch_build_egg
return cmd.easy_install(req)
File "C:\Python34\lib\site-packages\setuptools\command\easy_install.py",
line 587, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('jnius>=1.1-dev')
Complete output from command python setup.py egg_info:
No local packages or download links found for jnius>=1.1-dev
Traceback (most recent call last):
File "", line 17, in
File
"C:\Users\arun_m\AppData\Local\Temp\pip_build_arun_m\sikuli\setup.py",
line 39, in
'Development Status :: 4 - Beta'
File "C:\Python34\lib\distutils\core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "C:\Python34\lib\site-packages\setuptools\dist.py", line 239,
in init
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "C:\Python34\lib\site-packages\setuptools\dist.py", line 263,
in fetch_build_eggs
parse_requirements(requires), installer=self.fetch_build_egg
File "C:\Python34\lib\site-packages\pkg_resources.py", line 564, in
resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "C:\Python34\lib\site-packages\pkg_resources.py", line 802, in
best_match
return self.obtain(req, installer) # try and download/install
File "C:\Python34\lib\site-packages\pkg_resources.py", line 814, in
obtain
return installer(requirement)
File "C:\Python34\lib\site-packages\setuptools\dist.py", line 313,
in fetch_build_egg
return cmd.easy_install(req)
File
"C:\Python34\lib\site-packages\setuptools\command\easy_install.py",
line 587, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution
for Requirement.parse('jnius>=1.1-dev')
---------------------------------------- Cleaning up... Command python setup.py egg_info failed with error code 1 in
C:\Users\arun_m\AppData\Local\Temp\pip_build_arun_m\sikuli Storing
debug log for failure in C:\Users\arun_m\pip\pip.log
What do I do to get it installed?
I can execute the Sikuli script from a Python Script but I want to have this installed in Python so that I can use it from within Python by using:
from sikuli import *

Sikuli is not available in CPython (my assumption of what you mean by 'Python'). This would have to be installed 'in' Jython and is still interpreter dependent. I don't use the sikuli IDE because it has no IDE features, but then you run into an issue where Sikuli cannot be run in all IDE's. The IDE must be able to load the .jar correctly. Try Eclipse: http://doc.sikuli.org/faq/040-other-ide.html. My Eclipse project is set up following these directions and I can simply run-as Jython and the script will execute the Sikuli part of the script as expected.

There is no python package available for standalone Sikuli.
Are you trying to install Python-Sikuli-Client as the only sikuli package available at below location
https://pypi.python.org/pypi/python-sikuli-client
SikuliX-1.1.0 is latest Sikuli installation available. It comes in executable jars format and you need JRE 1.6 or higher installed on your system to install SikuliX. It has it's own IDE or you can use Jython as interpreter to compile and run your python scripts written for Sikuli in IDEs like Eclipse with PyDev plugin.
Sikuli script is older version for Sikuli and again it is JAVA jar executable file and needs JRE to run and install it.

For sikuli module installation, you should satisfy the jnius module dependency. jnius installation failed for me, so I built it from sources and installed manually.
After jnius installation, you are free to install sikuli via pip. Before using sikuli, you also need to do the following things:
Add path to JRE jvm.dll to the PATH environment variable, e.g.:
"C:\Program Files (x86)\Java\jre1.8.0_101\bin\client"
Increase JVM heap:
set _JAVA_OPTIONS=-Xmx512M (in Windows)

Related

installing pip on rhel 7.6 + failed on unknown distribution option: project_urls

we tried to installe pip on rhel machine - rhel 7.6 version ( we have python 2.7 )
as the following
ls
AUTHORS.txt build dist docs LICENSE.txt MANIFEST.in NEWS.rst PKG-INFO pyproject.toml README.rst setup.cfg setup.py src
python setup.py install
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'project_urls'
warnings.warn(msg)
Traceback (most recent call last):
File "setup.py", line 87, in <module>
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*',
File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 269, in __init__
_Distribution.__init__(self,attrs)
File "/usr/lib64/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 302, in finalize_options
ep.load()(self, ep.name, value)
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2453, in resolve
raise ImportError(str(exc))
ImportError: 'module' object has no attribute 'check_specifier'
we can see that installing is complain about
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*',
so we looked on setup.py
and we marked the following line - python_requires
entry_points={
"console_scripts": [
"pip=pip._internal.cli.main:main",
"pip{}=pip._internal.cli.main:main".format(sys.version_info[0]),
"pip{}.{}=pip._internal.cli.main:main".format(
*sys.version_info[:2]
),
],
},
zip_safe=False,
#python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*', )
then we run again
installation is now better and we can see the pip is installed as
which pip
/usr/bin/pip
but last lines are:
Traceback (most recent call last):
File "setup.py", line 86, in <module>
zip_safe=False,
File "/usr/lib64/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 73, in run
self.do_egg_install()
File "/usr/lib/python2.7/site-packages/setuptools/command/install.py", line 101, in do_egg_install
cmd.run()
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 380, in run
self.easy_install(spec, not self.no_deps)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 604, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 655, in install_item
self.process_distribution(spec, dist, deps)
File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 701, in process_distribution
distreq.project_name, distreq.specs, requirement.extras
TypeError: __init__() takes exactly 2 arguments (4 given)
so after re-run again the python setup.py install , installation succeeded without errors
example of last lines:
Extracting pip-20.1.1-py2.7.egg to /usr/lib/python2.7/site-packages
pip 20.1.1 is already the active version in easy-install.pth
Installing pip script to /usr/bin
Installing pip2.7 script to /usr/bin
Installing pip2 script to /usr/bin
Installed /usr/lib/python2.7/site-packages/pip-20.1.1-py2.7.egg
Processing dependencies for pip==20.1.1
Finished processing dependencies for pip==20.1.1
so the workaround here was the following
marked the line as
# python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*',
and run the following twice
python setup.py install
but this workaround maybe works but it is ugly
any suggestion how to fix the pip installation ?
reference - Using python_requires to require Python 2.7 or 3.2+

Fipy nominally installed but fipy.test() fails with error messages

I'm attempting to get FiPy set up using Miniconda 2 on a Windows 7 system, and got to the point of running the test suite with the recommended python -c "import fipy; fipy.test()".
Unfortunately rather than getting test results, the suite gave me an error with stack trace:
running egg_info
creating c:\users\bram\appdata\local\temp\tmpbzt0mv\FiPy.egg-info
writing c:\users\bram\appdata\local\temp\tmpbzt0mv\FiPy.egg-info\PKG-INFO
writing top-level names to c:\users\bram\appdata\local\temp\tmpbzt0mv\FiPy.egg-info\top_level.txt
writing dependency_links to c:\users\bram\appdata\local\temp\tmpbzt0mv\FiPy.egg-info\dependency_links.txt
writing manifest file 'c:\users\bram\appdata\local\temp\tmpbzt0mv\FiPy.egg-info\SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'c:\users\bram\appdata\local\temp\tmpbzt0mv\FiPy.egg-info\SOURCES.txt'
writing manifest file 'c:\users\bram\appdata\local\temp\tmpbzt0mv\FiPy.egg-info\SOURCES.txt'
running test
running build_ext
fipy version 3.1.3
numpy version 1.12.0
pysparse is not installed
scipy version 0.18.1
matplotlib is not installed
gist is not installed
mpi4py is not installed
mpi4py is not installed
enthought.mayavi is not installed
gmsh is not installed
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\Users\Bram\Miniconda2\lib\site-packages\fipy\__init__.py", line 164, in test
cmdclass={'test': _TestClass(_test)})
File "D:\Users\Bram\Miniconda2\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "D:\Users\Bram\Miniconda2\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "D:\Users\Bram\Miniconda2\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "D:\Users\Bram\Miniconda2\lib\site-packages\setuptools-27.2.0-py2.7.egg\setuptools\command\test.py", line 172, in run
File "D:\Users\Bram\Miniconda2\lib\site-packages\fipy\tests\testClass.py", line 236, in run_tests
testLoader = loader_class()
File "D:\Users\Bram\Miniconda2\lib\unittest\main.py", line 94, in __init__
self.parseArgs(argv)
File "D:\Users\Bram\Miniconda2\lib\unittest\main.py", line 149, in parseArgs
self.createTests()
File "D:\Users\Bram\Miniconda2\lib\unittest\main.py", line 158, in createTests
self.module)
File "D:\Users\Bram\Miniconda2\lib\unittest\loader.py", line 130, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "D:\Users\Bram\Miniconda2\lib\unittest\loader.py", line 100, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'testFiPy'
Can anyone help me get this to work? I don't know where to start with this outcome.
Just wanted to add for those who (like me) are new to git and conda - to install the FiPy from develop branch you should (following this answer):
Activate your conda environment: source activate myenv (or activate
myenv for windows)
Install git and pip: conda install git pip
Install FiPy: pip install git+git://github.com/usnistgov/fipy#develop

Unable to install Flask-Mail

I am trying to send an email using Flask when a user registers on my website. I used the command pip install Flask-Mail to install. However, I get the following error of possible version mismatch:
Downloading/unpacking Flask-mail
Downloading Flask-Mail-0.9.1.tar.gz (45kB): 45kB downloaded
Running setup.py (path:/tmp/pip_build_root/Flask-mail/setup.py) egg_info for package Flask-mail
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/Flask-mail/setup.py", line 52, in <module>
'Topic :: Software Development :: Libraries :: Python Modules'
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 225, in __init__
_Distribution.__init__(self,attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 257, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2029, in require
working_set.resolve(self.dist.requires(self.extras),env,installer))
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 592, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (certifi 2016.2.28 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('certifi==2015.11.20'))
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/Flask-mail/setup.py", line 52, in <module>
'Topic :: Software Development :: Libraries :: Python Modules'
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 225, in __init__
_Distribution.__init__(self,attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 257, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 2029, in require
working_set.resolve(self.dist.requires(self.extras),env,installer))
File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 592, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (certifi 2016.2.28 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('certifi==2015.11.20'))
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/Flask-mail
Any possible workarounds? Any help will be greatly appreciated. Thanks!
The easiest way to avoid these kind of problems is to create a virtual environment
>>>pip install virtualenv
>>>cd my_project_folder
>>>virtualenv venv
now activate your virtual environment
>>>source venv/bin/activate
now install there pip install Flask-Mail
hopefully now it should work there
if your done working then deactivate it
>>>deactivate
or
It seems like all the problem is because of certifi version conflict
so try downloading the source from here
https://pypi.python.org/pypi/certifi
and install from source
Extract it go into the folder and run this command
sudo python setup.py install
and it should work
peace
If you do not have virtual env set up I would suggest do so first. If you have that already you may need to activate that from your terminal:
>>>source venv/bin/activate
Once completed just deactivate it for your rest of the commands:
>>>deactivate

How to install pybrain

I am attempting to install pybrains but I am getting this error:
C:\Python34\python.exe "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.4\helpers\pycharm\pycharm_setup_runner.py" C:\Users\PycharmProjects\Youtube\pybrain-pybrain-87c7ac3\setup.py
Testing started at 14:08 ...
running pycharm_test
running egg_info
writing PyBrain.egg-info\PKG-INFO
writing dependency_links to PyBrain.egg-info\dependency_links.txt
writing top-level names to PyBrain.egg-info\top_level.txt
reading manifest file 'PyBrain.egg-info\SOURCES.txt'
writing manifest file 'PyBrain.egg-info\SOURCES.txt'
running build_ext
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.4\helpers\pycharm\pycharm_setup_runner.py", line 26, in <module>
exec (fh.read(), globals(), locals())
File "<string>", line 21, in <module>
File "C:\PYTHON34\LIB\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\PYTHON34\LIB\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "C:\PYTHON34\LIB\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python34\lib\site-packages\setuptools\command\test.py", line 138, in run
self.with_project_on_sys_path(self.run_tests)
File "C:\Python34\lib\site-packages\setuptools\command\test.py", line 118, in with_project_on_sys_path
func()
File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.4\helpers\pycharm\pycharm_commands\pycharm_test.py", line 18, in run_tests
testLoader=loader_class()
File "C:\PYTHON34\LIB\unittest\main.py", line 92, in __init__
self.parseArgs(argv)
File "C:\PYTHON34\LIB\unittest\main.py", line 139, in parseArgs
self.createTests()
File "C:\PYTHON34\LIB\unittest\main.py", line 146, in createTests
self.module)
File "C:\PYTHON34\LIB\unittest\loader.py", line 146, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "C:\PYTHON34\LIB\unittest\loader.py", line 146, in <listcomp>
suites = [self.loadTestsFromName(name, module) for name in names]
File "C:\PYTHON34\LIB\unittest\loader.py", line 105, in loadTestsFromName
module = __import__('.'.join(parts_copy))
File "c:\users\dhowarth\pycharmprojects\youtube\pybrain-pybrain-87c7ac3\pybrain\__init__.py", line 1, in <module>
from structure.__init__ import *
ImportError: No module named 'structure'
Process finished with exit code 1
Where do I find the 'Structure' module?
Anyone having the same issue?
I have followed the instructions on: https://github.com/pybrain/pybrain/wiki/installation.
what am I missing?
The Pybrain can be setup by pip install pybrain directly.
The FNN in pybrain have a bit problem of convergence and performance. As substitution, there are lots of advices on Python for AI, such as FANN (An example) and scikit-learn (for lots of ML method but not contains FNN directly).
Try not to use pip. I always prefer getting the entire folder from PyPI or github (if available) and then doing the simple python setup.py install.
Also, whenever you do some work with the packages which are under active development (or not very commonly use), please read their documentation.
If you see the documentation : Here. You will see that they use Python 2.x.
And you are clearly using Python 3.x.
Get Python 2.x and download the folder from github. Unzip it and install.
Hope it helps.
Cheers.
Try following queries:
pip install numpy
pip install scipy
pip install pybrain
OR:
download ez_setup.py and run it:
python ez_setup.py
OR:
use easy_install:
easy_install pybrain

Installing Fabric On Windows (Error No Module Called Readline)

I'm trying to use the Fabric 0.1.1 deploy tool (http://docs.fabfile.org/) on Windows and we're running into an issue with the readline module. I've been through various threads but can't seem to solve the issue. It's important because we can't deploy applications from Windows based machines.
C:\Documents and Settings\dev\Desktop\deploy>fab
Traceback (most recent call last):
File "C:\python\Scripts\fab-script.py", line 8, in <module>
load_entry_point('fabric==0.1.1', 'console_scripts', 'fab')()
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.py"
, line 277, in load_entry_point
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.py"
, line 2180, in load_entry_point
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.py"
, line 1913, in load
File "build\bdist.win32\egg\fabric.py", line 25, in <module>
**ImportError: No module named readline**
Installing the module results in:
**easy_install readline**
Searching for readline
Reading http://pypi.python.org/simple/readline/
Reading http://www.python.org/
Best match: readline 2.6.4
Downloading http://pypi.python.org/packages/source/r/readline/readline-2.6.4.tar
.gz#md5=7568e8b78f383443ba57c9afec6f4285
Processing readline-2.6.4.tar.gz
Running readline-2.6.4\setup.py -q bdist_egg --dist-dir c:\docume~1\ji81b9~1.che
\locals~1\temp\easy_install-pzkz1a\readline-2.6.4\egg-dist-tmp-szs2ps
Traceback (most recent call last):
File "C:\python\Scripts\easy_install-script.py", line 8, in <module>
load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')()
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman
d\easy_install.py", line 1671, in main
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman
d\easy_install.py", line 1659, in with_ei_usage
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman
d\easy_install.py", line 1675, in <lambda>
File "c:\python\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "c:\python\lib\distutils\dist.py", line 975, in run_commands
self.run_command(cmd)
File "c:\python\lib\distutils\dist.py", line 995, in run_command
cmd_obj.run()
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman
d\easy_install.py", line 211, in run
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman
d\easy_install.py", line 446, in easy_install
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman
d\easy_install.py", line 476, in install_item
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman
d\easy_install.py", line 655, in install_eggs
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman
d\easy_install.py", line 930, in build_and_install
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\comman
d\easy_install.py", line 919, in run_setup
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\sandbo
x.py", line 27, in run_setup
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\sandbo
x.py", line 63, in run
File "c:\python\lib\site-packages\setuptools-0.6c9-py2.6.egg\setuptools\sandbo
x.py", line 29, in <lambda>
File "setup.py", line 93, in <module>
AttributeError: 'module' object has no attribute 'symlink'
Has anybody solved this issue or can anybody suggest a workaround?
The readline module you are trying to install with easy_install is for OS X, not windows. There are Windows-compatible replacements for readline out there but perhaps you should first try updating fabric itself to a more current version (0.9 is out there now).
Grepping the source of the 0.9 version does not find any dependencies on readline.
Following these steps exactly worked for me:
1) Installed using the MSI installer for x86 from here.
2) Installed in the default C:\Python27 directory.
3) Create a new directory: C:\Python27\Scripts
4) Added C:\Python27 and C:\Python27\Scripts to the system path:
5) Download the distribute_setup.py from here into C:\Python27\Scripts
6) Open a command line, navigate to C:\Python27\Scripts, run: 'python distribute_setup.py'
7) now run 'easy_install pip'
8) now run 'pip install fabric'
9) You should get an error saying PyCrypto couldn't install. You can download the pre-build Windows binary from here. Run this to install PyCrypto.
10) run 'pip install fabric' again and it should say everything is installed.
11) in a different directory (let's say c:\dev\hello) create a fabfile.py and add the following code:
def hello(name="world"):
print("Hello %s!" % name)
12) cd to this directory and run 'fab hello:working'. You should see output say
Hello working!
Done.
Give this readline a try. It is a module for Windows that allows additional features in IPython that aren't native and might work with what you are trying to do.
0.1.1 is an older version, I believe. I have no problem installing Fabric on Windows with ActivePython (w/ PyPM):
C:\> pypm install fabric
Ready to perform these actions:
The following packages will be installed:
fabric-0.9.0 pycrypto-2.0.1
Get: [pypm.activestate.com] fabric 0.9.0-1
Get: [pypm.activestate.com] pycrypto 2.0.1-1
Installing fabric-0.9.0
Fixing script C:\Users\sridharr\AppData\Roaming\Python\Scripts\fab-script.py
Installing pycrypto-2.0.1
Download and run easy_install installer for your python version from http://pypi.python.org/pypi/setuptools#downloads . ie: setuptools-0.6c11.win32-py2.6.exe
On the command prompt, lauch easy_install -U fabric to install the last fabric release.
Readline should be available with Cygwin, if you want to move your entire stack in that direction.

Categories

Resources