0
votes

(centos6.6) before updating python2.7.3 ,it is python 2.6.6. When running pybot --version, errors came out as follows.

I want to install the test environment of python 2.7.3 and robot framework 2.7.6 and paramiko-1.7.4 and pycrypto-2.6

[root@localhost robotframework-2.7.6]# pybot --version
Traceback (most recent call last):
File "/usr/bin/pybot", line 4, in
from robot import run_cli
File "/usr/lib/python2.7/site-packages/robot/__init__.py", line 22, in
from robot.rebot import rebot, rebot_cli
File "/usr/lib/python2.7/site-packages/robot/rebot.py", line 268, in
from robot.conf import RebotSettings
File "/usr/lib/python2.7/site-packages/robot/conf/__init__.py", line 17, in
from .settings import RobotSettings, RebotSettings
File "/usr/lib/python2.7/site-packages/robot/conf/settings.py", line 17, in
from robot import utils
File "/usr/lib/python2.7/site-packages/robot/utils/__init__.py", line 23, in
from .compress import compress_text
File "/usr/lib/python2.7/site-packages/robot/utils/compress.py", line 25, in
import zlib
ImportError: No module named zlib

2
Don't post screenshots of text. Or links to screenshots of text. Put the text in your question.khelwood
I have made the error information more readable by using the blockquote markup. On Stack Overflow, every user is encouraged to edit their question to improve it as much as possible, so feel free to add more useful background information if you have any.Vince Bowdren

2 Answers

0
votes

Reasons could be any of the following:

  1. Either the python files (at least one) have lost the formatting. Python is prone to formatting errors
  2. At least one installation (python, Robo) doesn't have administrative privileges.
  3. Environment variables (PATH, CLASSPATH, PYTHON PATH) are not set fine.
  4. What does python --version print? If this throws errors, installation has issues.
0
votes

I installed the zlib-devel and python-level with the help of yum, and recompiled the python, finally completed the test of installation. Thank you for your answer.