How to import SSH-Library on RIDE? - robotframework

I'm going to do SSH connection using RIDE in VM.
To do so, I had to call SSH Library, but it failed.
How to import SSH Library call successfully?
i try
a. https://github.com/robotframework/SSHLibrary (Fail)
b. cmd > pip install robotframework-SSHLibrary (Fail)
c. cmd > pip install -U robotframework-sshlibrary==3.8.0 (Fail)
reference
https://github.com/robotframework/SSHLibrary
https://www.youtube.com/watch?v=Zr8ejSgBgNU
help me plz

Alternatively you can download the source distribution from PyPI, extract it, and install it using one of the following depending are you using Python or Jython:
python setup.py install
jython setup.py install

I tried with python3. If you notice there are some dependent libraries, which has to be installed first.
python3 -m pip install robotframework-sshlibrary
Defaulting to user installation because normal site-packages is not writeable
Collecting robotframework-sshlibrary
Downloading robotframework-sshlibrary-3.8.0.tar.gz (51 kB)
|████████████████████████████████| 51 kB 128 kB/s
**Requirement already satisfied: robotframework>=3.0 in /usr/local/lib/python3.8/dist-packages (from robotframework-sshlibrary) (3.0.4)
Requirement already satisfied: paramiko>=1.15.3 in /usr/local/lib/python3.8/dist-packages (from robotframework-sshlibrary) (2.10.1)
Requirement already satisfied: scp>=0.13.0 in /usr/local/lib/python3.8/dist-packages (from robotframework-sshlibrary) (0.13.2)
Requirement already satisfied: pynacl>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from paramiko>=1.15.3->robotframework-sshlibrary) (1.5.0)
Requirement already satisfied: bcrypt>=3.1.3 in /usr/local/lib/python3.8/dist-packages (from paramiko>=1.15.3->robotframework-sshlibrary) (3.2.0)
Requirement already satisfied: six in /usr/local/lib/python3.8/dist-packages (from paramiko>=1.15.3->robotframework-sshlibrary) (1.16.0)
Requirement already satisfied: cryptography>=2.5 in /usr/local/lib/python3.8/dist-packages (from paramiko>=1.15.3->robotframework-sshlibrary) (2.9.2)
Requirement already satisfied: cffi>=1.4.1 in /usr/local/lib/python3.8/dist-packages (from pynacl>=1.0.1->paramiko>=1.15.3->robotframework-sshlibrary) (1.15.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.8/dist-packages (from cffi>=1.4.1->pynacl>=1.0.1->paramiko>=1.15.3->robotframework-sshlibrary) (2.21)**
Building wheels for collected packages: robotframework-sshlibrary
Building wheel for robotframework-sshlibrary (setup.py) ... done
Created wheel for robotframework-sshlibrary: filename=robotframework_sshlibrary-3.8.0-py3-none-any.whl size=55119
sha256=63c5bf6b17e0ecbcd45f32b8a1ea367cfc0a19d2f17601a49b4f632472c68177
Stored in directory: /home/.cache/pip/wheels/c9/c2/39/2571d47c551e3012fa4e8284bbdcac2d025db39c275b058db4
Successfully built robotframework-sshlibrary
Installing collected packages: robotframework-sshlibrary
Successfully installed robotframework-sshlibrary-3.8.0

Related

Azure Machine Learning notebooks: ModuleNotFound error

I'm working through a Python exercise using Azure Machine Learning notebooks. I'm unable to import torch even after !pip install torch.
Notebook says Requirement already satisfied, then errors out with:
!pip install torch
import torch
data = torch.tensor(encode(text), dtype=torch.long)
print(data.shape, data.dtype)
print(data[:100])
4 sec
ModuleNotFoundError: No module named 'torch'
Requirement already satisfied: torch in /anaconda/envs/azureml_py38/lib/python3.8/site-packages (1.12.0)
Requirement already satisfied: typing-extensions in /anaconda/envs/azureml_py38/lib/python3.8/site-packages (from torch) (4.4.0)
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Input In [22], in <cell line: 4>()
1 # Encode the entire dataset and store it into a torch.Tensor
3 get_ipython().system('pip install torch')
----> 4 import torch
5 data = torch.tensor(encode(text), dtype=torch.long)
6 print(data.shape, data.dtype)
ModuleNotFoundError: No module named 'torch'
I opened up a terminal in Azure ML Studio and tried pip install torch too, same Requirement already satisfied message showed.
How do I get torch (and any other Python modules where this occurs) working in AML notebooks?
I've found creating environments and installing packages through the terminal to be a much more reliable experience than doing it from an AML notebook.
I suggest using one of the provided terminals (either the one available in the compute instance's details, or the one available in JupyterLab) to create a new conda environment which you can customize to your liking.
Something like:
conda create -n my_tutorial python=3.10
conda activate my_tutorial
pip install --user ipykernel
python -m ipykernel install --user --name=my_tutorial
# Do a complete install of PyTorch, take a look at the available versions here https://pytorch.org/get-started/previous-versions/
conda install pytorch=1.13 torchvision=0.14 torchaudio=0.13 pytorch-cuda=11.7 -c pytorch -c nvidia -y
Afterwards, just make sure your notebooks use the my_tutorial kernel and you should be good to go. Whenever you want to pip install something new, just go back to the terminal, activate your kernel, and install the thing, then it should be available in your notebooks as well.
The issue was lined out in the docs here. Don't use !pip within the notebook. Instead use %pip.

Unable to import get tweets from twitter scraper

I installed twitter scraper package successfully.
!pip install twitterscraper --upgrade
Requirement already satisfied: twitterscraper in /usr/local/lib/python3.7/dist-packages (1.6.1)
Requirement already satisfied: requests in /usr/local/lib/python3.7/dist-packages (from twitterscraper) (2.23.0)
Requirement already satisfied: lxml in /usr/local/lib/python3.7/dist-packages (from twitterscraper) (4.2.6)
Requirement already satisfied: billiard in /usr/local/lib/python3.7/dist-packages (from twitterscraper) (3.6.4.0)
Requirement already satisfied: bs4 in /usr/local/lib/python3.7/dist-packages (from twitterscraper) (0.0.1)
Requirement already satisfied: coala-utils~=0.5.0 in /usr/local/lib/python3.7/dist-packages (from twitterscraper) (0.5.1)
Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.7/dist-packages (from bs4->twitterscraper) (4.6.3)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/dist-packages (from requests->twitterscraper) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/dist-packages (from requests->twitterscraper) (2.10)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/dist-packages (from requests->twitterscraper) (2021.10.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/dist-packages (from requests->twitterscraper) (1.24.3)
I tried to import get tweets from twitter scraper.
from twitter_scraper import get_tweets
I received the following message:
ModuleNotFoundError
Traceback (most recent call last)
<ipython-input-68-865864c6c316> in <module>()
1 # Import the required libraries.
----> 2 from twitter_scraper import get_tweets
3 import pandas as pd
ModuleNotFoundError: No module named 'twitter_scraper'
Can you help me resolve this issue?

Hey I'm unable to install pyinstaller properly

Hey I tried running these:
1)pip uninstall pyinstaller
2)pip install pyinstaller
3)pyinstaller
but then the error starts
Please help me I'm trying to compile py files to exe the first timeenter code here
E:\Hacking\TEsting malwarres>pip uninstall pyinstaller
Found existing installation: pyinstaller 4.1
Uninstalling pyinstaller-4.1:
Would remove:
c:\users\admin\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\scripts\pyi-archive_viewer.exe
c:\users\admin\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\scripts\pyi-bindepend.exe
c:\users\admin\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\scripts\pyi-grab_version.exe
c:\users\admin\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\scripts\pyi-makespec.exe
c:\users\admin\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\scripts\pyi-set_version.exe
c:\users\admin\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\scripts\pyinstaller.exe
c:\users\admin\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages\pyinstaller-4.1.dist-info\*
c:\users\admin\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages\pyinstaller\*
Proceed (y/n)? y
Successfully uninstalled pyinstaller-4.1
E:\Hacking\TEsting malwarres>pip install pyinstaller
Collecting pyinstaller
Using cached pyinstaller-4.1-py3-none-any.whl
Requirement already satisfied: pefile>=2017.8.1 in c:\users\admin\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (from pyinstaller) (2019.4.18)
Requirement already satisfied: altgraph in c:\users\admin\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (from pyinstaller) (0.17)
Requirement already satisfied: pyinstaller-hooks-contrib>=2020.6 in c:\users\admin\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (from pyinstaller) (2020.10)
Requirement already satisfied: setuptools in c:\program files\windowsapps\pythonsoftwarefoundation.python.3.7_3.7.2544.0_x64__qbz5n2kfra8p0\lib\site-packages (from pyinstaller) (47.1.0)
Requirement already satisfied: pywin32-ctypes>=0.2.0 in c:\users\admin\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (from pyinstaller) (0.2.0)
Requirement already satisfied: future in c:\users\admin\appdata\local\packages\pythonsoftwarefoundation.python.3.7_qbz5n2kfra8p0\localcache\local-packages\python37\site-packages (from pefile>=2017.8.1->pyinstaller) (0.18.2)
Installing collected packages: pyinstaller
WARNING: The scripts pyi-archive_viewer.exe, pyi-bindepend.exe, pyi-grab_version.exe, pyi-makespec.exe, pyi-set_version.exe and pyinstaller.exe are installed in 'C:\Users\ADMIN\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pyinstaller-4.1
E:\Hacking\TEsting malwarres>pyinstaller
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.
Reinstall python and pyinstaller then run it.
By the way, pyinstaller by itself will not work, It just lists commands.
Do pyinstaller filename.py for it to work.

Error: Python module 'cleannlp' not found. Install with: pip install cleannlp in R

I am using R studio, on ubuntu 18.4, specifically the cleannlp package to analyze texts according to this tutorial found here https://statsmaths.github.io/cleanNLP/state-of-union.html.
As per the installation instructions found here - https://statsmaths.github.io/cleanNLP/, I have thus far installed cleannlp like thus install.packages("cleanNLP") in Rstudio's console. Further, I have install it's modules pip install cleannlp in terminal. As far as I can see, I have not had any trouble with either installation.
There are 4 backends to cleannlp as evidenced in the installation instructions:
cnlp_init_stringi(locale="en_GB")
cnlp_init_udpipe(model_name="english")
cnlp_init_spacy(model_name="en")
cnlp_init_corenlp(lang="en")
I do not seem to have any trouble using stringi or udpipe. However, using spacy and corenlp backends seem to be throwing this error
Error: Python module 'cleannlp' not found. Install with: pip install cleannlp
4. stop(msg, call. = (msg == ""))
3. assert(!is.null(disc$required_module_path), "Python module 'cleannlp' not found. Install with:\n pip install cleannlp")
2. check_python()
1. cnlp_init_spacy("/usr/local/lib/python3.6/")
I am fairly certain the python package is installed successfully, inferring this from the following:
(base) redapemusic35#mythinker:~$ pip install cleannlp
Processing ./.cache/pip/wheels/1e/23/e6/a201f9e10a6664d0639453ee4f19bba7baf8544e9e82b18d1b/cleannlp-1.0.3-py3- none-any.whl
Requirement already satisfied: spacy in ./anaconda3/lib/python3.7/site-packages (from cleannlp) (2.2.3)
Requirement already satisfied: plac<1.2.0,>=0.9.6 in ./anaconda3/lib/python3.7/site-packages (from spacy->cleannlp) (1.1.3)
Requirement already satisfied: setuptools in ./anaconda3/lib/python3.7/site-packages (from spacy->cleannlp) (45.2.0.post20200210)
Requirement already satisfied: srsly<1.1.0,>=0.1.0 in ./anaconda3/lib/python3.7/site-packages (from spacy->cleannlp) (1.0.2)
Requirement already satisfied: blis<0.5.0,>=0.4.0 in ./anaconda3/lib/python3.7/site-packages (from spacy->cleannlp) (0.4.1)
Requirement already satisfied: murmurhash<1.1.0,>=0.28.0 in ./anaconda3/lib/python3.7/site-packages (from spacy->cleannlp) (1.0.2)
Requirement already satisfied: numpy>=1.15.0 in ./anaconda3/lib/python3.7/site-packages (from spacy->cleannlp) (1.18.1)
Requirement already satisfied: thinc<7.4.0,>=7.3.0 in ./anaconda3/lib/python3.7/site-packages (from spacy->cleannlp) (7.3.1)
Requirement already satisfied: wasabi<1.1.0,>=0.4.0 in ./anaconda3/lib/python3.7/site-packages (from spacy->cleannlp) (0.6.0)
Requirement already satisfied: requests<3.0.0,>=2.13.0 in ./anaconda3/lib/python3.7/site-packages (from spacy->cleannlp) (2.22.0)
Requirement already satisfied: preshed<3.1.0,>=3.0.2 in ./anaconda3/lib/python3.7/site-packages (from spacy->cleannlp) (3.0.2)
Requirement already satisfied: catalogue<1.1.0,>=0.0.7 in ./anaconda3/lib/python3.7/site-packages (from spacy->cleannlp) (1.0.0)
Requirement already satisfied: cymem<2.1.0,>=2.0.2 in ./anaconda3/lib/python3.7/site-packages (from spacy->cleannlp) (2.0.3)
Requirement already satisfied: tqdm<5.0.0,>=4.10.0 in ./anaconda3/lib/python3.7/site-packages (from thinc<7.4.0,>=7.3.0->spacy->cleannlp) (4.42.1)
Requirement already satisfied: idna<2.9,>=2.5 in ./anaconda3/lib/python3.7/site-packages (from requests<3.0.0,>=2.13.0->spacy->cleannlp) (2.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./anaconda3/lib/python3.7/site-packages (from requests<3.0.0,>=2.13.0->spacy->cleannlp) (1.25.8)
Requirement already satisfied: certifi>=2017.4.17 in ./anaconda3/lib/python3.7/site-packages (from requests<3.0.0,>=2.13.0->spacy->cleannlp) (2019.11.28)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./anaconda3/lib/python3.7/site-packages (from requests<3.0.0,>=2.13.0->spacy->cleannlp)(3.0.4)
Requirement already satisfied: importlib-metadata>=0.20; python_version< "3.8" in ./anaconda3/lib/python3.7/site-packages (from catalogue<1.1.0,>=0.0.7->spacy->cleannlp) (1.5.0)
Requirement already satisfied: zipp>=0.5 in ./anaconda3/lib/python3.7/site-packages (from importlib-metadata>=0.20; python_version < "3.8"->catalogue<1.1.0,>=0.0.7->spacy->cleannlp) (2.2.0)
Installing collected packages: cleannlp
Successfully installed cleannlp-1.0.3
Some things I have tried include
no path in
cnlp_init_spacy()
Which gives me:
Error: Python module 'cleannlp' not found. Install with: pip install cleannlp
4. stop(msg, call. = (msg == ""))
3.
assert(!is.null(disc$required_module_path), "Python module 'cleannlp' not found. Install with:\n pip install cleannlp")
2. check_python()
1. cnlp_init_spacy()
no difference whether I this with either of the backends (both spacy and corenlp) giving me trouble.
sudo pip install
sudo -H pip install
sudo -H pip3 install
and
sudo pip3 install
All of which seem to work fine. I wonder however, if there is a problem with R choosing which installation. So I uninstalled and tried again. Further, I do seem to have any trouble with python outside of R.
It might be that R is using a python environment that doesn't have "cleannlp" installed. You can check this via:
install.packages("reticulate")
library(reticulate)
py_discover_config(required_module="cleannlp")
This should point to your anaconda3 path. In case it is pointing to another environment, e.g. r-miniconda, you can change this with:
Sys.setenv(RETICULATE_PYTHON = path)
where path is you path to anaconda, which in Mac often has the form: "/Users/YOUR_NAME/anaconda3/bin/python"
Now run:
py_discover_config(required_module="cleannlp")
again and check if it does find "cleannlp" in your anaconda3 python environment.
If that worked, then you can now run:
cnlp_download_corenlp()
cnlp_init_corenlp(lang="en")

Installing OpenMDAO 2.6.0 Errors

My system right now is running Python 3.5.2 with pip version 19.0.3 and I'm trying to install OpenMDAO using pip. I run the command like it says on the getting started page of the website to install:
pip install openmdao
It begins to runs but then I get the following errors:
error: can't copy 'openmdao/devtools/xdsm_viewer/XDSMjs/build': doesn't exist or not a regular file
Failed building wheel for openmdao"
Any suggestions to fix this?
I am not able to replicate your issue. Are you starting from a clean environment?
Here is my attempt:
~ $ conda create -n O35 python=3.5 numpy scipy --quiet
Solving environment: ...working... done
## Package Plan ##
environment location: /home/swryan/anaconda2/envs/O35
added / updated specs:
- numpy
- python=3.5
- scipy
The following NEW packages will be INSTALLED:
blas: 1.0-mkl
ca-certificates: 2019.1.23-0
certifi: 2018.8.24-py35_1
intel-openmp: 2019.1-144
libedit: 3.1.20181209-hc058e9b_0
libffi: 3.2.1-hd88cf55_4
libgcc-ng: 8.2.0-hdf63c60_1
libgfortran-ng: 7.3.0-hdf63c60_0
libstdcxx-ng: 8.2.0-hdf63c60_1
mkl: 2018.0.3-1
mkl_fft: 1.0.6-py35h7dd41cf_0
mkl_random: 1.0.1-py35h4414c95_1
ncurses: 6.1-he6710b0_1
numpy: 1.15.2-py35h1d66e8a_0
numpy-base: 1.15.2-py35h81de0dd_0
openssl: 1.0.2r-h7b6447c_0
pip: 10.0.1-py35_0
python: 3.5.6-hc3d631a_0
readline: 7.0-h7b6447c_5
scipy: 1.1.0-py35hfa4b5c9_1
setuptools: 40.2.0-py35_0
sqlite: 3.27.2-h7b6447c_0
tk: 8.6.8-hbc83047_0
wheel: 0.31.1-py35_0
xz: 5.2.4-h14c3975_4
zlib: 1.2.11-h7b6447c_3
Proceed ([y]/n)?
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
~ $ conda activate O35
(O35) ~ $ pip install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl
mkl-random 1.0.1 requires cython, which is not installed.
Installing collected packages: pip
Found existing installation: pip 10.0.1
Uninstalling pip-10.0.1:
Successfully uninstalled pip-10.0.1
Successfully installed pip-19.0.3
(O35) ~ $ pip install openmdao
Collecting openmdao
Collecting pyparsing (from openmdao)
Using cached https://files.pythonhosted.org/packages/de/0a/001be530836743d8be6c2d85069f46fecf84ac6c18c7f5fb8125ee11d854/pyparsing-2.3.1-py2.py3-none-any.whl
Collecting six (from openmdao)
Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting pyDOE2 (from openmdao)
Collecting networkx>=2.0 (from openmdao)
Requirement already satisfied: scipy in ./anaconda2/envs/O35/lib/python3.5/site-packages (from openmdao) (1.1.0)
Requirement already satisfied: numpy in ./anaconda2/envs/O35/lib/python3.5/site-packages (from openmdao) (1.15.2)
Collecting decorator>=4.3.0 (from networkx>=2.0->openmdao)
Using cached https://files.pythonhosted.org/packages/f1/cd/7c8240007e9716b14679bc217a1baefa4432aa30394f7e2ec40a52b1a708/decorator-4.3.2-py2.py3-none-any.whl
Installing collected packages: pyparsing, six, pyDOE2, decorator, networkx, openmdao
Successfully installed decorator-4.3.2 networkx-2.2 openmdao-2.6.0 pyDOE2-1.1.2 pyparsing-2.3.1 six-1.12.0
(O35) ~ $

Resources