Error installing AutoitLibrary through command line - command-line

I need to install robotframework-autoitlibrary to use on my test cases.
My problem is when I try to install AutoIt Library through command line with the following command:
pip install -U robotframework-autoitlibrary --no-cache-dir --pre
I have this error:
C:\windows\system32>pip install -U robotframework-autoitlibrary --no-cache-
dir --pre
Collecting robotframework-autoitlibrary
Downloading
https://files.pythonhosted.org/packages/4e/a4/9e51fe35b1da7a006b773c9c234f78e89bcc4f267152c4e9fa8260631fa8/robotframework-autoitlibrary-1.2.2.zip (701kB)
100% |################################| 706kB 1.6MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\user-a~1\appdata\local\temp\pip-install-
oro1ov\robotframework-autoitlibrary\setup.py", line 93, in <module>
destPath = os.path.normpath(os.path.join(os.getenv("HOMEDRIVE"),
r"\RobotFramework\Extensions\AutoItLibrary"))
File "c:\python27\lib\ntpath.py", line 65, in join
result_drive, result_path = splitdrive(path)
File "c:\python27\lib\ntpath.py", line 115, in splitdrive
if len(p) > 1:
TypeError: object of type 'NoneType' has no len()
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
c:\users\user-a~1\appdata\local\temp\pip-install-oro1ov\robotframework-
autoitlibrary\
My currently installed python packages and their versions are:
Pillow==5.3.0
Pygments==2.3.1
pypiwin32==223
Pypubsub==4.0.0
pywin32==224
robotframework==3.1
robotframework-ride==1.5.2.1
robotframework-selenium2library==3.0.0
robotframework-seleniumlibrary==3.3.0
selenium==3.141.0
six==1.12.0
typing==3.6.6
urllib3==1.24.1
wxPython==4.0.3
I already try this command:
pip install --upgrade setuptools
When input echo %HOMEDRIVE%, the output is:
C:\Users\cmpeixoto>echo %HOMEDRIVE%
C:
Thanks for your help,

The error looks like the environment variable HOMEDRIVE is not set, even though it has a value according to your test (the library installer uses it to copy some files).
Can you try this - manually set it, and straight after that run the pip - in the same Command Prompt (cmd) session:
set HOMEDRIVE=C:
pip install -U robotframework-autoitlibrary --no-cache-dir --pre

Related

UserWarning: Setuptools is replacing distutils. at building Hue : sudo make apps ,it fails with :

add the development packages, build and get the development server running:
"PYTHON_VER is python3.7."
"Python 3 module install via pip"
"SYS_PYTHON is /root/.pyenv/shims/python3.7."
"ENV_PYTHON is /data/opt/hue/hue/build/env/bin/python3.7."
added in ~/.bashrc
export PYTHON_VER=python3.7
then
git clone https://github.com/cloudera/hue.git
cd hue
make apps
/data/opt/hue/hue/build/env/lib/python3.7/site-packages/_distutils_hack/__init__.py:19: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
"Distutils was imported before Setuptools, but importing Setuptools "
/data/opt/hue/hue/build/env/lib/python3.7/site-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Exception:
Traceback (most recent call last):
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/req/req_set.py", line 634, in _prepare_file
abstract_dist.prep_for_dist()
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/req/req_install.py", line 412, in run_egg_info
self.setup_py, self.name,
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/pip/req/req_install.py", line 387, in setup_py
import setuptools # noqa
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/setuptools/__init__.py", line 8, in <module>
import _distutils_hack.override # noqa: F401
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/_distutils_hack/override.py", line 1, in <module>
__import__('_distutils_hack').do_override()
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/_distutils_hack/__init__.py", line 77, in do_override
ensure_local_distutils()
File "/data/opt/hue/hue/build/env/lib/python3.7/site-packages/_distutils_hack/__init__.py", line 64, in ensure_local_distutils
assert '_distutils' in core.__file__, core.__file__
AssertionError: /root/.pyenv/versions/3.7.0/lib/python3.7/distutils/core.py
Answer1
pip3 install --upgrade pip setuptools
Answer2
pip uninstall pyzmq
# then
pip install pyzmq
it doesn't work,any idea?

Sagemath Jupyter Kernel install error after conda-forge installation

So I've installed SageMath through anaconda with conda install sage python jupyterlab.
I then go to install the sage jupyter kernel as in this thread via jupyter kernelspec install --user ~/miniconda3/envs/sage/share/jupyter/kernels/sagemath
But this command fails with the following error
Traceback (most recent call last):
File "/Users/llamagod/miniconda3/envs/sage/bin/jupyter-kernelspec", line 10, in <module>
sys.exit(KernelSpecApp.launch_instance())
File "/Users/llamagod/miniconda3/envs/sage/lib/python3.9/site-packages/traitlets/config/application.py", line 845, in launch_instance
app.start()
File "/Users/llamagod/miniconda3/envs/sage/lib/python3.9/site-packages/jupyter_client/kernelspecapp.py", line 266, in start
return self.subapp.start()
File "/Users/llamagod/miniconda3/envs/sage/lib/python3.9/site-packages/jupyter_client/kernelspecapp.py", line 132, in start
self.kernel_spec_manager.install_kernel_spec(self.sourcedir,
File "/Users/llamagod/miniconda3/envs/sage/lib/python3.9/site-packages/jupyter_client/kernelspec.py", line 340, in install_kernel_spec
shutil.copytree(source_dir, destination)
File "/Users/llamagod/miniconda3/envs/sage/lib/python3.9/shutil.py", line 557, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
File "/Users/llamagod/miniconda3/envs/sage/lib/python3.9/shutil.py", line 513, in _copytree
raise Error(errors)
shutil.Error: [('/Users/llamagod/miniconda3/envs/sage/share/jupyter/kernels/sagemath/doc', '/Users/llamagod/Library/Jupyter/kernels/sagemath/doc', "[Errno 2] No such file or directory: '/Users/llamagod/miniconda3/envs/sage/share/jupyter/kernels/sagemath/doc'")]
I tried symlinking $SAGE_LOCAL/share/doc to that directory but I get the same error.
SageMath 9.2, JupyterLab 3.0.16
Is this a known issue ?
In the end I used the alternate method described on this page to install the kernel and avoid copying over the documentation.
ln -s `sage -sh -c 'ls -d $SAGE_LOCAL/share/jupyter/kernels/sagemath'` $HOME/miniconda3/envs/sage/share/jupyter
So I can now run the sagemath kernel from the jupyter in my conda environment.

ERROR: Command errored out with exit status 1: python setup.py egg_info; update setuptools doesn't work

I'm trying to install a private python module with command: "pip install . -i "private url" "
I had this error:
Command "python setup.py egg_info" failed with error code 1 in
C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-rnoryb6e\
I uninstall Python 38 and reinstall it.
Pip is updated and setup_tools is also updated.
And now I have this error:
D:\L1\onelib\trx-5g>D:\L1\onelib\venv\Scripts\pip.exe install . -i https://artifactory-espoo1..com/artifactory/api/pypi/ulphy-pypi-prod-virtual/simple
Looking in indexes:
https://artifactory-espoo1..com/artifactory/api/pypi/ulphy-pypi-prod-virtual/simple,
https://artifactory-espoo2.***********.com/artifactory/ap
i/pypi/mn-l1-pz-int-lib-local/simple Processing d:\l1\onelib\trx-5g
ERROR: Command errored out with exit status 1:
command: 'd:\l1\onelib\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] =
'"'"'C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-_4yae_lz\se
tup.py'"'"';
file='"'"'C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-_4yae_lz\setup.py'"'"';f=getattr(tokenize,
'"'"'open'"'"', open)(file);code=f.read().repla ce('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))'
egg_info --egg-base
'C:\Users\hwi_pi\AppData\Local\Temp\pip-pip-egg-info-zvlq1hsf'
cwd: C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-_4yae_lz
Complete output (15 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-_4yae_lz\setup.py",
line 23, in
version=os.environ.get('CI_COMMIT_TAG', f'0.0.0+{get_local_version_label()}'),
File "C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-_4yae_lz\setup.py",
line 17, in get_local_version_label
commit_hash = subprocess.check_output(COMMAND.split()).decode('utf-8').strip()
File "C:\Users\hwi_pi\AppData\Local\Programs\Python\Python38\lib\subprocess.py",
line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:\Users\hwi_pi\AppData\Local\Programs\Python\Python38\lib\subprocess.py",
line 489, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\hwi_pi\AppData\Local\Programs\Python\Python38\lib\subprocess.py",
line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\hwi_pi\AppData\Local\Programs\Python\Python38\lib\subprocess.py",
line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for
full command output.
Where the logs are located ?
I'm on Windows 10.
Python 3.8.5.
I launched this command via Pycharm and via cmd windows and same result.
I tried to run the command in administration mode; and same result.
I have tried every solution available on stackoverflow and nothing solves my error.
I tried to find C:\Users\hwi_pi\AppData\Local\Temp\pip-req-build-_4yae_lz\setup.py to see the file setup.py but foled pip-req-build-_4yae_lz doesn't exist.
I can access to https://artifactory-espoo1.************.com/artifactory/api/pypi/ulphy-pypi-prod-virtual/simple via firefox; but I can't download it in .zip for example
Someone to help please ?

Installing awscli without internet

I am trying to install awscli on a RHEL machine.
Python 2.7.5 is installed, the machine does not have internet access.
I have installed setuptools 38.5.2 and setuptools_scm 1.15.7 from sources successfully.
Here is the command I have tried to run when installing:
sudo /usr/bin/python2.7 awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws sudo awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Both are exiting with the following issue:
Running cmd: /usr/bin/python virtualenv.py --no-download --python /usr/bin/python /usr/local/aws
Running cmd: /usr/local/aws/bin/pip install --no-index --find-links file:///home/talendmaster/QlikSensePOC/awscli-bundle/packages awscli-1.14.54.tar.gz
Traceback (most recent call last):
File "awscli-bundle/install", line 143, in <module>
main()
File "awscli-bundle/install", line 132, in main
pip_install_packages(opts.install_dir)
File "awscli-bundle/install", line 100, in pip_install_packages
pip_script, PACKAGES_DIR, cli_tarball))
File "awscli-bundle/install", line 45, in run
p.returncode, cmd, stdout + stderr))
__main__.BadRCError: Bad rc (1) for cmd '/usr/local/aws/bin/pip install --no-index --find-links file:///home/talendmaster/QlikSensePOC/awscli-bundle/packages awscli-1.14.54.tar.gz': Processing ./awscli-1.14.54.tar.gz
Collecting botocore==1.9.7 (from awscli==1.14.54)
Collecting colorama<=0.3.7,>=0.2.5 (from awscli==1.14.54)
Collecting docutils>=0.10 (from awscli==1.14.54)
Collecting rsa<=3.5.0,>=3.1.2 (from awscli==1.14.54)
Collecting s3transfer<0.2.0,>=0.1.12 (from awscli==1.14.54)
Collecting PyYAML<=3.12,>=3.10 (from awscli==1.14.54)
Collecting jmespath<1.0.0,>=0.7.1 (from botocore==1.9.7->awscli==1.14.54)
Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.9.7->awscli==1.14.54)
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/setuptools_scm/: [Errno 101] Network is unreachable -- Some packages may not be found!
Download error on https://pypi.python.org/simple/setuptools-scm/: [Errno 101] Network is unreachable -- Some packages may not be found!
Couldn't find index page for 'setuptools_scm' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno 101] Network is unreachable -- Some packages may not be found!
No local packages or working download links found for setuptools_scm
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-kh_Hg9/python-dateutil/setup.py", line 67, in <module>
"test": Unsupported
File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources/__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1134, in obtain
return installer(requirement)
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-kh_Hg9/python-dateutil/
It seems to be related to setuptools_scm but reinstallation did not change anything. The internet access shouldn't be a problem since I have successfully installed a local version of the package.
I have just finished installing AWS CLI tools on an old RHEL 5.10 machine, this works for me as on date.
$ curl -LO https://s3.amazonaws.com/aws-cli/awscli-bundle.zip
$ unzip awscli-bundle.zip
$ ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Running cmd: /root/aws/bin/python virtualenv.py --no-download --python /root/aws/bin/python /usr/local/aws
Running cmd: /usr/local/aws/bin/pip install --no-index --find-links file:///root/awscli-bundle/packages/setup setuptools_scm-1.15.7.tar.gz
Running cmd: /usr/local/aws/bin/pip install --no-index --find-links file:///root/awscli-bundle/packages awscli-1.15.68.tar.gz
You can now run: /usr/local/bin/aws --version
$ aws --version
aws-cli/1.15.68 Python/2.6.8 Linux/2.6.18-363.el5 botocore/1.10.67
References:
https://medium.com/#vikas027/aws-cli-tools-in-rhel-centos-5-cd4b9beeb096 (my post)
https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-bundle.html#install-bundle-other

Ansible error due to GMP package version on Centos6

I have a Dockerfile that builds an image based on CentOS (tag: centos6):
FROM centos
RUN rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
RUN yum update -y
RUN yum install ansible -y
ADD ./ansible /home/root/ansible
RUN cd /home/root/ansible;ansible-playbook -v -i hosts site.yml
Everything works fine until Docker hits the last line, then I get the following errors:
[WARNING]: The version of gmp you have installed has a known issue regarding
timing vulnerabilities when used with pycrypto. If possible, you should update
it (ie. yum update gmp).
PLAY [all] ********************************************************************
GATHERING FACTS ***************************************************************
Traceback (most recent call last):
File "/usr/bin/ansible-playbook", line 317, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/bin/ansible-playbook", line 257, in main
pb.run()
File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py", line 319, in run
if not self._run_play(play):
File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py", line 620, in _run_play
self._do_setup_step(play)
File "/usr/lib/python2.6/site-packages/ansible/playbook/__init__.py", line 565, in _do_setup_step
accelerate_port=play.accelerate_port,
File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line 204, in __init__
cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
errread, errwrite)
File "/usr/lib64/python2.6/subprocess.py", line 1234, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Stderr from the command:
package epel-release-6-8.noarch is already installed
I imagine that the cause of the error is the gmp package not being up to date.
There is a related issue on GitHub: https://github.com/ansible/ansible/issues/6941
But there doesn't seem to be any solutions at the moment ...
Any ideas ?
Thanks in advance !
My site.yml playbook:
- hosts: all
pre_tasks:
- shell: echo 'hello'
Make sure that the files site.yml and hosts are present in the directory you're adding to /home/root/ansible.
Side note, you can simplify your Dockerfile by using WORKDIR:
WORKDIR /home/root/ansible
RUN ansible-playbook -v -i hosts site.yml