error while installing robot framework on ironpython - testing

I'm becoming mad about installing robotframework on IronPython in a Windows machine. Please someone could take a look on this.
I have installed IronPython 2.7.7, added the path system variable for both main and Scripts folder, also I installed the elementtree-1.2.7-20070827-preview.zip as it looks that the library that comes with IronPython is "broken" (this info and instruction comes from IronPython site).
Then I run the
ipy -X:Frames -m ensurepip
to be able to use pip.
Everything should be ready now to get the robotframework installed by:
ipy -X:Frames -m pip install robotframework
The package starts getting downloaded until here:
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\setuptools\__init__.py", line 11, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\setuptools\extern\__init__.py", line 1, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\__init__.py", line 46, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\extern\__init__.py", line 42, in load_module
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\_vendor\six.py", line 701, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\_vendor\six.py", line 692, in exec_
AttributeError: 'module' object has no attribute '_getframe'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\***\appdata\local\temp\pip-build-vnlada\robotframework\
I tried another workaround just downloading the robotframework source, uncompressing and placing it in my program folders. From the RF folder I tried to run:
C:\Program Files (x86)\IronPython 2.7\ipy.exe" setup.py install
and again same error:
File "setup.py", line 11, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site- packages\setuptools\__init__.py", line 11, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\setuptools\extern\__init__.py", line 1, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\__init__.py", line 46, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\extern\__init__.py", line 42, in load_module
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\_vendor\six.py", line 701, in <module>
File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\_vendor\six.py", line 692, in exec_
AttributeError: 'module' object has no attribute '_getframe'
In this website this guy solves the issue using this last workaround, however it didnt work for me.
http://it-kosmopolit.de/blog/2015/08/31/install-robot-framework-with-ironpython-on-windows/
Thank you in advance.

This is how I resolve it, however I dont intend to say is the way to resolve it.
There are installers .exe of Robot Framework for Windows but they are not intended to be on IronPython, but Python. Keeping in mind that I already got the IronPython folder, what I did is:
install Python
downloand and install the RF installer .exe file from here https://pypi.python.org/pypi/robotframework/2.8.5
install it pointing to the Python directory (it doesnt recognize the IronPython folder)
Simply added the ipy.exe from my IronPython folder to the PATH variable.
Surprisingly it worked with no more headache, I have now Robot Framework on IronPython.

Related

Vosk in Windows 10

I need help in using Vosk in Windows 10. I installed python 3.8, then used the pip install vosk command. The Python installation is at C:\Users\kamal\AppData\Local\Programs\Python\Python38 and I can see that vosk is at C:\Users\kamal\AppData\Local\Programs\Python\Python38\Lib\site-packages\vosk. Next, I cloned the vosk git at C:\Users\kamal\vosk-api (kamal is my username). Then, I downloaded the en-us model and placed it in C:\Users\kamal\vosk-api\python\example\model. Next, in cmd, I went to the C:\Users\kamal\vosk-api\python\example directory and ran the command python ./test_srt.py test.wav test.txt. I am getting the following messages:
File "./test_srt.py", line 12, in <module>
model = Model(lang="en-us")
File "C:\Users\kamal\AppData\Local\Programs\Python\Python38\lib\site-packages\vosk\__init__.py", line 50, in __init__
model_path = self.get_model_path(model_name, lang)
File "C:\Users\kamal\AppData\Local\Programs\Python\Python38\lib\site-packages\vosk\__init__.py", line 63, in get_model_path
model_path = self.get_model_by_lang(lang)
File "C:\Users\kamal\AppData\Local\Programs\Python\Python38\lib\site-packages\vosk\__init__.py", line 97, in get_model_by_lang
self.download_model(Path(directory, result_model[0]))
File "C:\Users\kamal\AppData\Local\Programs\Python\Python38\lib\site-packages\vosk\__init__.py", line 102, in download_model
MODEL_DIRS[3].mkdir()
File "C:\Users\kamal\AppData\Local\Programs\Python\Python38\lib\pathlib.py", line 1288, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\Users\\kamal\\.cache\\vosk'
Exception ignored in: <function Model.__del__ at 0x0000022E05867D30>
Traceback (most recent call last):
File "C:\Users\kamal\AppData\Local\Programs\Python\Python38\lib\site-packages\vosk\__init__.py", line 56, in __del__
_c.vosk_model_free(self._handle)
AttributeError: 'Model' object has no attribute '_handle'
What has to be done?

Error loading library gpuarray with Theano

I am trying to run this script to test Theano's use of my GPU and get the following error:
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-
packages/theano/gpuarray/__init__.py", line 164, in <module>
use(config.device)
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-
packages/theano/gpuarray/__init__.py", line 151, in use
init_dev(device)
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-
packages/theano/gpuarray/__init__.py", line 60, in init_dev
sched=config.gpuarray.sched)
File "pygpu/gpuarray.pyx", line 614, in pygpu.gpuarray.init
(pygpu/gpuarray.c:9419)
File "pygpu/gpuarray.pyx", line 566, in pygpu.gpuarray.pygpu_init
(pygpu/gpuarray.c:9110)
File "pygpu/gpuarray.pyx", line 1021, in
pygpu.gpuarray.GpuContext.__cinit__ (pygpu/gpuarray.c:13472)
pygpu.gpuarray.GpuArrayException: Error loading library: -1
I need to use the nvidia-381 driver since my GPU is a 1080 ti and is not compatible with nvidia-375. I'm not sure if that matters but installing nvcc overwrites 381 and causes some errors if I reinstall 381 after setting up nvcc so I can't use nvcc.
I can import pygpu without errors but if I run pygpu.test() I get the following error and I don't know how to specify the DEVICE variable without nvcc.
======================================================================
ERROR: Failure: RuntimeError (No test device specified. Specify one using the DEVICE or GPUARRAY_TEST_DEVICE environment variables.)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/me/anaconda3/envs/py35/lib/python3.5/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/me/anaconda3/envs/py35/lib/python3.5/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/home/me/anaconda3/envs/py35/lib/python3.5/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 693, in _load
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 665, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/home/me/.local/lib/python3.5/site-packages/pygpu-0.6.2-py3.5-linux-x86_64.egg/pygpu/tests/test_tools.py", line 5, in <module>
from .support import (guard_devsup, rand, check_flags, check_meta, check_all,
File "/home/me/.local/lib/python3.5/site-packages/pygpu-0.6.2-py3.5-linux-x86_64.egg/pygpu/tests/support.py", line 32, in <module>
context = gpuarray.init(get_env_dev())
File "/home/me/.local/lib/python3.5/site-packages/pygpu-0.6.2-py3.5-linux-x86_64.egg/pygpu/tests/support.py", line 29, in get_env_dev
raise RuntimeError("No test device specified. Specify one using the DEVICE or GPUARRAY_TEST_DEVICE environment variables.")
RuntimeError: No test device specified. Specify one using the DEVICE or GPUARRAY_TEST_DEVICE environment variables.
----------------------------------------------------------------------
Ran 7 tests in 0.003s
FAILED (errors=7)
<nose.result.TextTestResult run=7 errors=7 failures=0>
Warning: its entirely possible that this is all wrong and the actual reason for your problem is in fact - as you suspect - your gpu driver.
I had the same issue with gpuarray on Windows 10.
In the end I solved it by:
completely uninstall python
install cuda 8.0 (with cudnn 5.1)
install anaconda
install theano through anaconda:
conda install theano pygpu
As you are using linux: This error message basically means It didn't work, don't ask me why And is mostly shown if something with your setup is wrong (e.g. different compilers used for compiling python and theano, or incompatible cuda version)
I would recommend to update to cuda 8.0 and to reinstall your python environment over anaconda (just in case)
On a side note: I tested your example script from the docu and at least that is working....
Note for windows users: Never try to install Anaconda in a location where you have spaces in the path... Everything looks fine ... until theano starts having trouble finding and compiling things.
Note regarding the pygpu.test():
Normally you just set the environment variable:
windows: set DEVICE=cuda
linux: export DEVICE=cuda
BUT The test has the habit of saying you didn't specify a device if the library couldn't be loaded...

Pandas not installing in 64 bit windows

I recently installed a new verion of Anaconda 3 4.2 on a windows laptop.
All the packages work fine , but pandas never worked for me from day 1.
So i thought of uninstalling and installing a new version of pandas 0.19
While using pip:
C:\Users\>python -m pip install --user pandas
Collecting pandas
Using cached pandas-0.19.2-cp35-cp35m-win_amd64.whl
Exception:
Traceback (most recent call last):
File "D:\Anaconda3-4.2\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "D:\Anaconda3-4.2\lib\site-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "D:\Anaconda3-4.2\lib\site-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "D:\Anaconda3-4.2\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "D:\Anaconda3-4.2\lib\site-packages\pip\req\req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "D:\Anaconda3-4.2\lib\site-packages\pip\download.py", line 821, in unpack_url
hashes=hashes
File "D:\Anaconda3-4.2\lib\site-packages\pip\download.py", line 663, in unpack_http_url
unpack_file(from_path, location, content_type, link)
File "D:\Anaconda3-4.2\lib\site-packages\pip\utils\__init__.py", line 599, in unpack_file
flatten=not filename.endswith('.whl')
File "D:\Anaconda3-4.2\lib\site-packages\pip\utils\__init__.py", line 499, in unzip_file
fp = open(fn, 'wb')
PermissionError: [Errno 13] Permission denied: C:\\Users\\AppData\\Local\\Temp\\pip-build-h5ip5q8f\\pandas\\pandas/io/tests/data/blank.xls
While using conda :
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : win-64
conda version : 4.3.8
conda is private : False
conda-env version : 4.3.8
conda-build version : 2.0.2
python version : 3.5.2.final.0
requests version : 2.12.4
root environment : D:\Anaconda3-4.2 (writable)
default environment : D:\Anaconda3-4.2
envs directories : D:\Anaconda3-4.2\envs
package cache : D:\Anaconda3-4.2\pkgs
channel URLs : https://repo.continuum.io/pkgs/free/win-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/win-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/win-64
https://repo.continuum.io/pkgs/pro/noarch
https://repo.continuum.io/pkgs/msys2/win-64
https://repo.continuum.io/pkgs/msys2/noarch
config file : None
offline mode : False
user-agent : conda/4.3.8 requests/2.12.4 CPython/3.5.2 Windows/7
Windows/6.1.7601
D:\Anaconda3-4.2\Scripts\conda-script.py install pandas
Traceback (most recent call last):
File "D:\Anaconda3-4.2\lib\site-packages\conda\exceptions.py", line 617, in conda_exception_handler
return_value = func(*args, **kwargs)
File "D:\Anaconda3-4.2\lib\site-packages\conda\cli\main.py", line 137, in _main
exit_code = args.func(args, p)
File "D:\Anaconda3-4.2\lib\site-packages\conda\cli\main_install.py", line 80, in execute
install(args, parser, 'install')
File "D:\Anaconda3-4.2\lib\site-packages\conda\cli\install.py", line 347, in install
execute_actions(actions, index, verbose=not context.quiet)
File "D:\Anaconda3-4.2\lib\site-packages\conda\plan.py", line 837, in execute_actions
execute_instructions(plan, index, verbose)
File "D:\Anaconda3-4.2\lib\site-packages\conda\instructions.py", line 258, in execute_instructions
cmd(state, arg)
File "D:\Anaconda3-4.2\lib\site-packages\conda\instructions.py", line 118, in UNLINKLINKTRANSACTION_CMD
txn = UnlinkLinkTransaction.create_from_dists(index, prefix, unlink_dists, link_dists)
File "D:\Anaconda3-4.2\lib\site-packages\conda\core\link.py", line 121, in create_from_dists
for dist, pkg_dir in zip(link_dists, pkg_dirs_to_link))
File "D:\Anaconda3-4.2\lib\site-packages\conda\core\link.py", line 121, in <genexpr>
for dist, pkg_dir in zip(link_dists, pkg_dirs_to_link))
File "D:\Anaconda3-4.2\lib\site-packages\conda\gateways\disk\read.py", line 71, in read_package_info
index_json_record = read_index_json(extracted_package_directory)
File "D:\Anaconda3-4.2\lib\site-packages\conda\gateways\disk\read.py", line 94, in read_index_json
with open(join(extracted_package_directory, 'info', 'index.json')) as fi:
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\Anaconda3-4.2\\pkgs\\pandas-0.19.2-np111py35_1\\info\\index.json
The problem is that you are trying to install Pandas as a regular user, and therefore cannot change the contents of Anaconda installation folder (where Python installed packages live). You need to run CMD or PowerShell (whichever you are using) as an administrator. Right-click on its shortcut in the start menu and click "Run as administrator", then run again the same command.
Try to use Anaconda package manager - conda instead of pip:
C:\> conda install pandas

ImportError: DLL load failed pyinstaller

I create .exe file wiht pyinstaller and when I try to start it such error occured:
C:\pyinstaller-develop>C:\pyinstaller-develop\RichardINC_aws\dist\RichardINC_aws.exe
Traceback (most recent call last):
File "", line 8, in
File "C:\pyinstaller-develop\PyInstaller\loader\pyimod03_importers.py",line
3
64, in load_module
exec(bytecode, module.dict)
File "C:\Python27\lib\site-packages\pillow-3.0.0-py2.7-win32.egg\PIL\Image.py"
,line 66, in
File "C:\pyinstaller-develop\PyInstaller\loader\pyimod03_importers.py",
line 364, in load_module
exec(bytecode, module.dict)
File "C:\Python27\lib\site-packages\pillow-3.0.0-py2.7-win32.egg\PIL_imaging.py",
line 7, in
File "C:\Python27\lib\site-packages\pillow-3.0.0-py2.7-win32.egg\PIL_imaging.py",
line 6, in bootstrap
ImportError: DLL load failed: ═х эрщфхэ єърчрээ√щ ьюфєы№.
RichardINC_aws returned -1
Maybe this thread on Github involving what seems to be a pyinstaller developer could help. I'm having a similar problem with both 32-bit and 64-bit versions of Python 3.5.1 for Windows but not with pyinstaller for python 3.4.2 in Debian (although the latter creates standalones that won't run in my 64-bit Windows but run fine in Linux).

Could not install gsutil with latest version

I upgraded to the latest BQ (2.0.14) then downloaded the latest gsutil tar package and manually updated gsutil thus:
"python setup.py install"
When I run gsutil I now get the following error message:
Traceback (most recent call last):
File "/usr/local/bin/gsutil", line 8, in
load_entry_point('gsutil==3.31', 'console_scripts', 'gsutil')()
File "build/bdist.linux-i686/egg/pkg_resources.py", line 318, in load_entry_point
File "build/bdist.linux-i686/egg/pkg_resources.py", line 2221, in load_entry_point
File "build/bdist.linux-i686/egg/pkg_resources.py", line 1954, in load
File "/usr/local/lib/python2.7/site-packages/gsutil-3.31-py2.7.egg/gslib/main.py", line 32, in
from gslib import util
File "/usr/local/lib/python2.7/site-packages/gsutil-3.31-py2.7.egg/gslib/util.py", line 28, in
from oauth2client.client import HAS_CRYPTO
ImportError: cannot import name HAS_CRYPTO
I couldn't find a way to actually uninstall gsutil so I'm stuck.
Any ideas?
Thanks
Have you tried upgrading oauth2client?
pip install -U oauth2client