I am trying to install AppiumLibrary with robotframework in jython
Steps followed:
jython -m pip install robotframework-appiumLibrary
Error:
Downloading/unpacking sauceclient>=0.1.0 (from robotframework-appiumLibrary)
Downloading sauceclient-0.2.1.tar.gz
Running setup.py (path:C:\Users\ABHISH~1\AppData\Local\Temp\pip_build_abhishek
singh\sauceclient\setup.py) egg_info for package sauceclient
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "C:\Users\ABHISH~1\AppData\Local\Temp\pip_build_abhisheksingh\saucecl
ient\setup.py", line 27, in <module>
from sauceclient import __version__
File "sauceclient.py", line 26, in <module>
is_py2 = sys.version_info.major is 2
AttributeError: 'tuple' object has no attribute 'major'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "C:\Users\ABHISH~1\AppData\Local\Temp\pip_build_abhisheksingh\sauceclient
\setup.py", line 27, in <module>
from sauceclient import __version__
File "sauceclient.py", line 26, in <module>
is_py2 = sys.version_info.major is 2
**AttributeError: 'tuple' object has no attribute 'major'**
Anybody has any idea how to use this libaray?
You need to debug sauceclient-0.2.1.tar.gz. See if you can install it before installing robotframework-appiumLibrary.
To fix the code in "sauceclient.py" edit to:
is_py2 = sys.version_info[0] is 2
Thank you so much ,it did work for me here are the steps I followed:
1.Download sauceclient-0.2.1 and Changed sauceclient.py
is_py2 = sys.version_info[0] is 2
2. Install sauceclient-0.2.1
jython -m setup.py install
3.Run :
jython -m pip install robotframework-appiumLibrary
Related
i install keras_cv on macbook M1:
pip install keras_cv
and run this code
import keras_cv
and get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/homebrew/lib/python3.10/site-packages/keras_cv/__init__.py", line 21, in <module>
from keras_cv import callbacks
File "/opt/homebrew/lib/python3.10/site-packages/keras_cv/callbacks/__init__.py", line 14, in <module>
from keras_cv.callbacks.pycoco_callback import PyCOCOCallback
File "/opt/homebrew/lib/python3.10/site-packages/keras_cv/callbacks/pycoco_callback.py", line 18, in <module>
from keras_cv.metrics.coco import compute_pycoco_metrics
ImportError: cannot import name 'compute_pycoco_metrics' from 'keras_cv.metrics.coco' (/opt/homebrew/lib/python3.10/site-packages/keras_cv/metrics/coco/__init__.py)
How i can fix this?
Clone and install keras_cv yourselfe:
git clone https://github.com/keras-team/keras-cv.git
cd keras-cv
python setup.py install
You may need install pycocotools.
$ pip install pycocotools
I originally had both python 2.7 and python 3 installed with python 2.7 as my default in PATH. I needed to run a script using python 3 but could not set it as my default python in PATH for some reason. After just uninstalling python 2.7 I opened 3 and ran the command python get-pip.py install which gave me this error
C:\Python30>python get-pip.py install
Traceback (most recent call last):
File "c:\users\jacob\appdata\local\temp\tmplqxvtx\pip.zip\pip\compat\__init__.py", line 16, in <module>
ImportError: cannot import name OrderedDict
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "get-pip.py", line 19177, in <module>
main()
File "get-pip.py", line 194, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip
File "c:\users\jacob\appdata\local\temp\tmplqxvtx\pip.zip\pip\__init__.py", line 14, in <module>
File "c:\users\jacob\appdata\local\temp\tmplqxvtx\pip.zip\pip\utils\__init__.py", line 22, in <module>
File "c:\users\jacob\appdata\local\temp\tmplqxvtx\pip.zip\pip\compat\__init__.py", line 18, in <module>
File "c:\users\jacob\appdata\local\temp\tmplqxvtx\pip.zip\pip\compat\ordereddict.py", line 25, in <module>
ImportError: No module named UserDict
I already tried python -m pip install (module name) but it returns No module named pip
I assume you use windows, so here is an answer how to install pip on windows:
how-do-i-install-pip-on-windows
On Linux you could just type:
sudo apt install python-pip
I'm trying to install ibm_db on my raspberry pi with raspbian. I've been trying with many methods but non one has worked, I always get this output :
root#raspberrypi:/home/pi# pip2 install ibm_db
Downloading/unpacking ibm-db
Downloading ibm_db-2.0.6.tar.gz (552kB): 552kB downloaded
Running setup.py (path:/tmp/pip-build-nzFdb7/ibm-db/setup.py) egg_info for package ibm-db
Detected 32-bit Python
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-nzFdb7/ibm-db/setup.py", line 149, in <module>
easy_cli_path = os.path.join(tmp_path, 'ibm_db-%s.egg' % ("-".join([VERSION, "py"+sys.version.split(" ")[0][0:3]]) if('win32' in sys.platform) else "-".join([VERSION, "py"+sys.version.split(" ")[0][0:3], os_, arch_])), 'clidriver')
NameError: name 'arch_' is not defined
Complete output from command python setup.py egg_info:
Detected 32-bit Python
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip-build-nzFdb7/ibm-db/setup.py", line 149, in <module>
easy_cli_path = os.path.join(tmp_path, 'ibm_db-%s.egg' % ("-".join([VERSION, "py"+sys.version.split(" ")[0][0:3]]) if('win32' in sys.platform) else "-".join([VERSION, "py"+sys.version.split(" ")[0][0:3], os_, arch_])), 'clidriver')
NameError: name 'arch_' is not defined
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-nzFdb7/ibm-db
Storing debug log for failure in /root/.pip/pip.log
Can anybody help me or give me an advice?
I'm getting frustated!
Thanks in advance.
I've tried installing mysql-connector python using
pip install mysql-connector-python
and
pip install mysql-connector-python --allow-external mysql-connector-python
I get the following error saying python v3.2 is not supported.
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/wolfgang/projects/python/python_backend/build/mysql-connector-python/setup.py", line 41, in <module>
import setupinfo
File "setupinfo.py", line 37, in <module>
major=sys.version_info[0], minor=sys.version_info[1]
RuntimeError: Python v3.2 is not supported
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/home/wolfgang/projects/python/python_backend/build/mysql-connector-python/setup.py", line 41, in <module>
import setupinfo
File "setupinfo.py", line 37, in <module>
major=sys.version_info[0], minor=sys.version_info[1]
RuntimeError: Python v3.2 is not supported
----------------------------------------
Should i upgrade my python version? or is there a workaround?
There were some important improvement in 2.x compatibility in Python 3.3, so a lot of packages only support 3.3+. mysql-connector-python is one of them. You are unlikely to be able to fix it without a large amount of work. It would be much easier to just install a later version.
I installed Python3.3 as non-root user, and use pip from python virtualenv to install beaver, a python module depends on python-daemon. However the install failure because python-daemon can not be installed.
(py_virtual)[infra#sulog01 beaver-master]$ pip install beaver==22
Downloading/unpacking beaver==22
Downloading Beaver-22.tar.gz (40kB): 40kB downloaded
Running setup.py egg_info for package beaver
Downloading/unpacking pika>=0.9.5 (from beaver==22)
Downloading pika-0.9.9.tar.gz (56kB): 56kB downloaded
Running setup.py egg_info for package pika
Downloading/unpacking python-daemon>=1.5.2 (from beaver==22)
Downloading python-daemon-1.6.tar.gz (41kB): 41kB downloaded
Running setup.py egg_info for package python-daemon
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/home/infra/logstash/beaver_Python/beaver-
master/py_virtual/build/python-daemon/setup.py", line 22, in
<module>main_module = __import__(main_module_name,
fromlist=['version'])
File "./daemon/__init__.py", line 42, in <module>
from . import version
File "./daemon/version/__init__.py", line 16, in <module>
from .version_info import version_info
File "./daemon/version/version_info.py", line 21
print 'revision: %(revno)d' % version_info
^
SyntaxError: invalid syntax
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/home/infra/logstash/beaver_Python/beaver-master/
py_virtual/build/python-daemon/setup.py", line 22, in <module>
main_module = __import__(main_module_name, fromlist=['version'])
File "./daemon/__init__.py", line 42, in <module>
from . import version
File "./daemon/version/__init__.py", line 16, in <module>
from .version_info import version_info
File "./daemon/version/version_info.py", line 21
print 'revision: %(revno)d' % version_info
^
SyntaxError: invalid syntax
----------------------------------------
Command python setup.py egg_info failed with error code 1 in
/home/infra/logstash/beaver_Python/beaver-master/py_virtual/
build/python-daemon
Storing complete log in /home/infra/.pip/pip.log
Do I need to install anything else before install python-daemon? Or is this issue with Python3.3 itself?
Looks like beaver and python-daemon don't support Python 3 at this point. You'll have to use Python 2.x.