pip install robotframework-desktoplibrary : failed. Why can't install? - installation

I tried to install desktoplibrary but get the error below :
pip install robotframework-desktoplibrary
Collecting robotframework-desktoplibrary
Downloading https://files.pythonhosted.org/packages/2f/dc/02d773cb2a052a77b226
e11a7104d506ecb827798bb4395757104eb0118f/robotframework-desktoplibrary-1.0.1.zip
(15.6MB)
|████████████████████████████████| 15.6MB 1.7MB/s
ERROR: Command errored out with exit status 1:
command: 'c:\users\sqaadmin\appdata\local\programs\python\python37\python.e
xe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sqaadmin
\\AppData\\Local\\Temp\\1\\pip-install-1m3ui56u\\robotframework-desktoplibrary\\
setup.py'"'"'; __file__='"'"'C:\\Users\\sqaadmin\\AppData\\Local\\Temp\\1\\pip-i
nstall-1m3ui56u\\robotframework-desktoplibrary\\setup.py'"'"';f=getattr(tokenize
, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'
"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-ba
se 'C:\Users\sqaadmin\AppData\Local\Temp\1\pip-install-1m3ui56u\robotframework-d
esktoplibrary\pip-egg-info'
cwd: C:\Users\sqaadmin\AppData\Local\Temp\1\pip-install-1m3ui56u\robotf
ramework-desktoplibrary\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\sqaadmin\AppData\Local\Temp\1\pip-install-1m3ui56u\robotfra
mework-desktoplibrary\setup.py", line 4, in <module>
execfile(join(dirname(abspath(__file__)), 'target', 'src', 'SikuliLibrar
y', 'version.py'))
NameError: name 'execfile' is not defined
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check th
e logs for full command output.

The library being installed does not support Python3. "execfile" python function it uses in its setup.py file is deprecated in python3 and thus, you get this sort of error.

If you are intending to test a windows desktop perhaps use windappdriver with the Desktop library portion of https://github.com/Accruent/robotframework-zoomba

Related

No such file or directory Error when trying to install fcntl using pip?

I'm trying to install fcntl with pip and I entered this into cmd:
pip install pycopy-fcntl
However, this error pops up and I have no idea what it is or how to fix it:
Collecting pycopy-fcntl
Using cached pycopy-fcntl-0.0.4.tar.gz (868 bytes)
ERROR: Command errored out with exit status 1:
command: 'c:\users\jackson\appdata\local\programs\python\python38\python.exe' -c 'import sys,
setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Jackson\\AppData\\Local\\Temp\\pip-install-l2eoh603\\pycopy-fcntl\\setup.py'"'"'; __file__='"'"'C:\\Users\\Jackson\\AppData\\Local\\Temp\\pip-install-l2eoh603\\pycopy-fcntl\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Jackson\AppData\Local\Temp\pip-pip-egg-info-j3akvbte'
cwd: C:\Users\Jackson\AppData\Local\Temp\pip-install-l2eoh603\pycopy-fcntl\
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\jackson\appdata\local\programs\python\python38\lib\tokenize.py", line 392, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory:
'C:\\Users\\Jackson\\AppData\\Local\\Temp\\pip-install-l2eoh603\\pycopy-fcntl\\setup.py'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full
command output.
Any thoughts on how I can fix this?
The home page at https://github.com/pfalcon/pycopy-lib#readme says:
pycopy-lib is a project to develop a non-monolithic standard library for the Pycopy project
It's not a pip-installable library, it's not even Python library at all. It's a library for Pycopy which is (https://github.com/pfalcon/pycopy#readme):
Pycopy aims to develop and maintain a minimalist, lightweight, and extensible implementation of Python(-compatible) language.
What are you really trying to install? Module fcntl? It's a module from stdlib since the dawn of time: https://docs.python.org/2.6/library/fcntl.html

Error messages when installing OSMnx and GeoPandas

Hello I am trying to install OSMnx and GeoPandas using pip install osmnx and pip install geopandas (according to this link: https://geoffboeing.com/2016/11/osmnx-python-street-networks/) It says that in order to use OSMnx you have to install geopandas and rtree first, rtree was installed with no issues, but this happened when trying to install osmnx (actually I tried to install osmnx before I found out that I need to install geopandas, I am giving this error here in order to give you as much information as possible)
ERROR: Command errored out with exit status 1:
command: 'c:\users\hodor\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Hodor\\AppData\\Local\\Temp\\pip-install-m1_7rif2\\Shapely\\setup.py'"'"'; __file__='"'"'C:\\Users\\Hodor\\AppData\\Local\\Temp\\pip-install-m1_7rif2\\Shapely\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Hodor\AppData\Local\Temp\pip-install-m1_7rif2\Shapely\pip-egg-info'
cwd: C:\Users\Hodor\AppData\Local\Temp\pip-install-m1_7rif2\Shapely\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Hodor\AppData\Local\Temp\pip-install-m1_7rif2\Shapely\setup.py", line 80, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\Users\Hodor\AppData\Local\Temp\pip-install-m1_7rif2\Shapely\shapely\_buildcfg.py", line 200, in <module>
lgeos = CDLL("geos_c.dll")
File "c:\users\hodor\appdata\local\programs\python\python37\lib\ctypes\__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Given module was not found
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
What shall I do (I do NOT want to install anaconda, so if there is a way of avoiding anaconda I would be very happy)?
Any help appreciated, thank you very much
EDIT: OK I tried the steps explained in the question mentioned as a duplicate of my question, I was able to install fiona following these steps but when I typed pip install geopandas I got this new error:
ERROR: Command errored out with exit status 1:
command: 'c:\users\hodor\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Hodor\\AppData\\Local\\Temp\\pip-install-5yg59bp6\\shapely\\setup.py'"'"'; __file__='"'"'C:\\Users\\Hodor\\AppData\\Local\\Temp\\pip-install-5yg59bp6\\shapely\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Hodor\AppData\Local\Temp\pip-install-5yg59bp6\shapely\pip-egg-info'
cwd: C:\Users\Hodor\AppData\Local\Temp\pip-install-5yg59bp6\shapely\
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Hodor\AppData\Local\Temp\pip-install-5yg59bp6\shapely\setup.py", line 80, in <module>
from shapely._buildcfg import geos_version_string, geos_version, \
File "C:\Users\Hodor\AppData\Local\Temp\pip-install-5yg59bp6\shapely\shapely\_buildcfg.py", line 200, in <module>
lgeos = CDLL("geos_c.dll")
File "c:\users\hodor\appdata\local\programs\python\python37\lib\ctypes\__init__.py", line 356, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Uvedený modul nebyl nalezen
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
EDIT 2: Even though the cmd wrote "succesfully installed fiona" when I tried to run simple Attempt.py
import fiona
I got this message:
Traceback (most recent call last):
File "c:\Users\Hodor\.vscode\extensions\ms-python.python-2019.10.41019\pythonFiles\ptvsd_launcher.py", line 43, in <module>
main(ptvsdArgs)
File "c:\Users\Hodor\.vscode\extensions\ms-python.python-2019.10.41019\pythonFiles\lib\python\old_ptvsd\ptvsd\__main__.py", line 432, in main
run()
File "c:\Users\Hodor\.vscode\extensions\ms-python.python-2019.10.41019\pythonFiles\lib\python\old_ptvsd\ptvsd\__main__.py", line 316, in run_file
runpy.run_path(target, run_name='__main__')
File "C:\Users\Hodor\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "C:\Users\Hodor\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "C:\Users\Hodor\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\Users\Hodor\Desktop\Untitled-1.py", line 1, in <module>
import fiona
File "C:\Users\Hodor\AppData\Local\Programs\Python\Python37\lib\site-packages\fiona\__init__.py", line 87, in <module>
from fiona.collection import BytesCollection, Collection
File "C:\Users\Hodor\AppData\Local\Programs\Python\Python37\lib\site-packages\fiona\collection.py", line 9, in <module>
from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: DLL load failed: Module not found
This may also help with troubleshooting of my issue
It can be really difficult to install the geospatial dependencies with pip, primarily due to Fiona in my experience. If you can use conda, it's strongly recommended to follow the install instructions in the OSMnx documentation
If you have any trouble with the installation, try installing OSMnx in a new, clean conda environment using conda-forge and strict channel priority:
conda config --prepend channels conda-forge
conda create -n ox --strict-channel-priority python=3 osmnx

How can I install nmslib on Windows 10

I am trying to install scispacy with pip and found that the installatio of nmslib was causing issues. There are various posts on the internet as to how to fix this, but none seem to be working for me.
I am running Python 3.7.4 on a Windows 10 laptop
Pip is version 19.2.1
Here is error part of the logs
2019-08-08T18:25:20,901 ERROR: Command errored out with exit status 1: 'c:\users\andre\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\andre\\AppData\\Local\\Temp\\pip-install-y6n2f026\\nmslib\\setup.py'"'"'; __file__='"'"'C:\\Users\\andre\\AppData\\Local\\Temp\\pip-install-y6n2f026\\nmslib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\andre\AppData\Local\Temp\pip-record-90f_5c93\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
2019-08-08T18:25:20,902 Exception information:
2019-08-08T18:25:20,902 Traceback (most recent call last):
2019-08-08T18:25:20,902 File "c:\users\andre\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\cli\base_command.py", line 188, in main
2019-08-08T18:25:20,902 status = self.run(options, args)
2019-08-08T18:25:20,902 File "c:\users\andre\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\install.py", line 407, in run
2019-08-08T18:25:20,902 use_user_site=options.use_user_site,
2019-08-08T18:25:20,902 File "c:\users\andre\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\req\__init__.py", line 58, in install_given_reqs
2019-08-08T18:25:20,902 **kwargs
2019-08-08T18:25:20,902 File "c:\users\andre\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\req\req_install.py", line 959, in install
2019-08-08T18:25:20,902 spinner=spinner,
2019-08-08T18:25:20,902 File "c:\users\andre\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\utils\misc.py", line 934, in call_subprocess
2019-08-08T18:25:20,902 raise InstallationError(exc_msg)
2019-08-08T18:25:20,902 pip._internal.exceptions.InstallationError: Command errored out with exit status 1: 'c:\users\andre\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\andre\\AppData\\Local\\Temp\\pip-install-y6n2f026\\nmslib\\setup.py'"'"'; __file__='"'"'C:\\Users\\andre\\AppData\\Local\\Temp\\pip-install-y6n2f026\\nmslib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\andre\AppData\Local\Temp\pip-record-90f_5c93\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
A few weeks ago I had the same issue and amongst the million things I tried I was able to get it to work, but at the time I wasn't entirely sure how I did it. I'm now on a new computer and the issue won't go away.
nmslib is a python wrapper over a c++ library. Therefore it could cause problems on few systems. I had the same issue.
Please clone the repository from here and install manually instead of the pip installation.
Try one of the following.
As per the comments from here,nmslib is optional and is only required if you use it for linker.So you may comment it from the requirements.txt and then do a manual installation via setup.py
Or
In your requirements.txt file add numpy to the top and install via setup.py file.
Though the above steps may throw a VC++ error, the scispacy module will get installed and you will be able to import it.
I tried both the solutions and they worked for me.
Note : Also, from the comments I understand that, now we may directly use spacy and load the scispacy models provided you have downloaded and installed the models.
pip install en_core_sci_sm
import spacy
nlp = spacy.load("en_core_sci_sm")
Let me know which one works for you.

Command "python setup.py egg_info" failed with error code 1 - unable to fix

I' m having trouble with pip.
I have installed and updated Setuptools, pip, ez_setup and django. I have also tried to install the packages manually from a tar.gz with no luck.
Still getting the same error:
edit: I'm not sure how to post in the code
Collecting postmaster Using cached postmaster-0.9.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "",
line 1, in
File "C:\Users\m_cur\AppData\Local\Temp\pip-build-kkkd0jbr\postmaster\setup.py",
line 4, in
from postmaster.version import VERSION
File "C:\Users\m_cur\AppData\Local\Temp\pip-build-kkkd0jbr\postmaster\postmaster__init__.py",
line 6, in
from .http import *
File "C:\Users\m_cur\AppData\Local\Temp\pip-build-kkkd0jbr\postmaster\postmaster\http.py",
line 146
except pycurl.error, error:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\m_cur\AppData\Local\Temp\pip-build-kkkd0jbr\postmaster\

EC2: permissions are denied

Am a developer i have no good knowledge on how to setup a server on AWS EC2 instance but what am trying to do is to setup thumbor server on EC2 thumbor is built with python and, am follwing this steps to get it up and running setup thumbor.
However, when i try to do install the following package using the user of the the EC2 ec2-user:
pip install numpy
i got this error:
running install_lib
creating /usr/local/lib64/python2.7/site-packages/numpy
error: could not create '/usr/local/lib64/python2.7/site-packages/numpy': Permission denied
----------------------------------------
Command "/usr/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip-build-Ibmsr4/numpy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-afbRUs-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Ibmsr4/numpy
i switched to the roor user and triedn to install the same package i got this error:
Traceback (most recent call last):
File "/usr/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3020, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 616, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 629, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 807, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pip==6.1.1
My question is what cause this problem and how i could install this package so i can continue the proccess of seting up the server !
Note: am using putty on Windows also i successed to install many packages previously so i can tell my creation to the EC2 is correct.

Resources