riverbed / steelscript

SteelScript is a collection of libraries and scripts in Python for interacting with Riverbed solutions and appliances, and other network infrastructure devices
https://support.riverbed.com/apis/steelscript
Other
14 stars 10 forks source link

Issue installing steelhead #3

Closed rainierpineda2 closed 5 years ago

rainierpineda2 commented 5 years ago

I encounter the following missing file when installing [u1163139@usdf23v0724 ~]$ sudo steel install (AD: corp.mmco.int) Password: Checking if pip is installed...done Package steelscript already installed Package steelscript.netprofiler already installed Package steelscript.netshark already installed Package steelscript.wireshark already installed Installing steelscript.appresponse...failed Command failed: pip install steelscript.appresponse Moving to /usr/lib/python2.7/site-packages/urllib3/response.pyc from /tmp/pip-uninstall-AJk2Qt/response.pyc Moving to /usr/lib/python2.7/site-packages/urllib3/response.pyo from /tmp/pip-uninstall-AJk2Qt/response.pyo Moving to /usr/lib/python2.7/site-packages/urllib3/util/ from /usr/lib/python2.7/site-packages/urllib3/~til Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname/_implementation.py'

You are using pip version 19.0.3, however version 19.1.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. See log for details: /root/.steelscript/steel.log [u1163139@usdf23v0724 ~]$ python -V Python 2.7.5

[u1163139@usdf23v0724 ~]$ python Python 2.7.5 (default, Sep 12 2018, 05:31:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import steelscript from steelscript.common.interaction.model import Model from steelscript.steelhead.core import steelhead Traceback (most recent call last): File "", line 1, in ImportError: No module named steelhead.core

rainierpineda2 commented 5 years ago

Checking if file exists and its there....

[root@usdf23v0724 u1163139]# ll /usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname/ total 32 -rwxr-xr-x 1 root root 5702 May 14 15:36 _implementation.py -rw-r--r-- 1 root root 4208 May 14 15:36 _implementation.pyc -rwxr-xr-x 1 root root 688 May 14 15:36 init.py -rw-r--r-- 1 root root 637 May 14 15:36 init.pyc -rw-r--r-- 1 root root 4130 Oct 23 2017 init.pyo

rainierpineda2 commented 5 years ago

Can someone please help...I'm unable to install even in an virtual environment

mgarabed commented 5 years ago

Try uninstalling everything first:

> steel uninstall

Then verify that all steelscript has been removed through pip freeze, and ls /usr/lib/python2.7/site-packages.

Then install just steelhead:

> pip install steelscript.steelhead

See if that solves the issue. If not, then the errors should be more helpful from that sequence.

rainierpineda2 commented 5 years ago

I followed your instructions above and got the same error

(venv) [u1163139@usdf23v0724 bakal]$ sudo pip install steelscript.steelhead DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. Collecting steelscript.steelhead Downloading https://files.pythonhosted.org/packages/53/0f/360f335c6f8d878c632ddce28200f8411f14db06d8354f19e0f6c5f9dcc7/steelscript.steelhead-0.7.1.tar.gz Requirement already satisfied: ipaddress in /usr/lib/python2.7/site-packages (from steelscript.steelhead) (1.0.22) Requirement already satisfied: netaddr in /usr/lib/python2.7/site-packages (from steelscript.steelhead) (0.7.19) Collecting steelscript.cmdline (from steelscript.steelhead) Downloading https://files.pythonhosted.org/packages/c0/53/94ae02c07ae730e21babe140dc31f7d45c3e9936cc56d3ab8735f88c0b71/steelscript.cmdline-0.6.2.tar.gz Requirement already satisfied: paramiko in /usr/lib/python2.7/site-packages (from steelscript.cmdline->steelscript.steelhead) (2.4.2) Requirement already satisfied: scp in /usr/lib/python2.7/site-packages (from steelscript.cmdline->steelscript.steelhead) (0.13.0) Collecting steelscript>=0.9.6 (from steelscript.cmdline->steelscript.steelhead) Using cached https://files.pythonhosted.org/packages/6e/c5/30e7bb919cce27278e59ec5eebfe50ffddbec373c3c23308004ae41fdd3b/steelscript-1.8.1.tar.gz Requirement already satisfied: cryptography>=1.5 in /usr/lib64/python2.7/site-packages (from paramiko->steelscript.cmdline->steelscript.steelhead) (2.4.1) Requirement already satisfied: pynacl>=1.0.1 in /usr/lib64/python2.7/site-packages (from paramiko->steelscript.cmdline->steelscript.steelhead) (1.3.0) Requirement already satisfied: pyasn1>=0.1.7 in /usr/lib/python2.7/site-packages (from paramiko->steelscript.cmdline->steelscript.steelhead) (0.4.4) Requirement already satisfied: bcrypt>=3.1.3 in /usr/lib64/python2.7/site-packages (from paramiko->steelscript.cmdline->steelscript.steelhead) (3.1.4) Collecting requests==2.19.1 (from steelscript>=0.9.6->steelscript.cmdline->steelscript.steelhead) Using cached https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl Requirement already satisfied: importlib in /usr/lib/python2.7/site-packages (from steelscript>=0.9.6->steelscript.cmdline->steelscript.steelhead) (1.0.4) Requirement already satisfied: python-dateutil in /usr/lib/python2.7/site-packages (from steelscript>=0.9.6->steelscript.cmdline->steelscript.steelhead) (2.8.0) Requirement already satisfied: idna>=2.1 in /usr/lib/python2.7/site-packages (from cryptography>=1.5->paramiko->steelscript.cmdline->steelscript.steelhead) (2.7) Requirement already satisfied: enum34; python_version < "3" in /usr/lib/python2.7/site-packages (from cryptography>=1.5->paramiko->steelscript.cmdline->steelscript.steelhead) (1.1.6) Requirement already satisfied: six>=1.4.1 in /usr/lib/python2.7/site-packages (from cryptography>=1.5->paramiko->steelscript.cmdline->steelscript.steelhead) (1.12.0) Requirement already satisfied: cffi!=1.11.3,>=1.7 in /usr/lib64/python2.7/site-packages (from cryptography>=1.5->paramiko->steelscript.cmdline->steelscript.steelhead) (1.11.5) Requirement already satisfied: asn1crypto>=0.21.0 in /usr/lib/python2.7/site-packages (from cryptography>=1.5->paramiko->steelscript.cmdline->steelscript.steelhead) (0.24.0) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests==2.19.1->steelscript>=0.9.6->steelscript.cmdline->steelscript.steelhead) (3.0.4) Collecting urllib3<1.24,>=1.21.1 (from requests==2.19.1->steelscript>=0.9.6->steelscript.cmdline->steelscript.steelhead) Using cached https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests==2.19.1->steelscript>=0.9.6->steelscript.cmdline->steelscript.steelhead) (2019.3.9) Requirement already satisfied: pycparser in /usr/lib/python2.7/site-packages (from cffi!=1.11.3,>=1.7->cryptography>=1.5->paramiko->steelscript.cmdline->steelscript.steelhead) (2.19) ERROR: pynetbox 4.0.6 has requirement requests<3.0,>=2.20.0, but you'll have requests 2.19.1 which is incompatible. Installing collected packages: urllib3, requests, steelscript, steelscript.cmdline, steelscript.steelhead Found existing installation: urllib3 1.24.1 Uninstalling urllib3-1.24.1: Successfully uninstalled urllib3-1.24.1 Rolling back uninstall of urllib3 Moving to /usr/lib/python2.7/site-packages/backports/ssl_match_hostname/ from /usr/lib/python2.7/site-packages/backports/~sl_match_hostname Moving to /usr/lib/python2.7/site-packages/urllib3-1.24.1.dist-info/ from /usr/lib/python2.7/site-packages/~rllib3-1.24.1.dist-info Moving to /usr/lib/python2.7/site-packages/urllib3/init.py from /tmp/pip-uninstall-QTETgA/init.py Moving to /usr/lib/python2.7/site-packages/urllib3/init.pyc from /tmp/pip-uninstall-QTETgA/init.pyc Moving to /usr/lib/python2.7/site-packages/urllib3/init.pyo from /tmp/pip-uninstall-QTETgA/init.pyo Moving to /usr/lib/python2.7/site-packages/urllib3/_collections.py from /tmp/pip-uninstall-QTETgA/_collections.py Moving to /usr/lib/python2.7/site-packages/urllib3/_collections.pyc from /tmp/pip-uninstall-QTETgA/_collections.pyc Moving to /usr/lib/python2.7/site-packages/urllib3/_collections.pyo from /tmp/pip-uninstall-QTETgA/_collections.pyo Moving to /usr/lib/python2.7/site-packages/urllib3/connection.py from /tmp/pip-uninstall-QTETgA/connection.py Moving to /usr/lib/python2.7/site-packages/urllib3/connection.pyc from /tmp/pip-uninstall-QTETgA/connection.pyc Moving to /usr/lib/python2.7/site-packages/urllib3/connection.pyo from /tmp/pip-uninstall-QTETgA/connection.pyo Moving to /usr/lib/python2.7/site-packages/urllib3/connectionpool.py from /tmp/pip-uninstall-QTETgA/connectionpool.py Moving to /usr/lib/python2.7/site-packages/urllib3/connectionpool.pyc from /tmp/pip-uninstall-QTETgA/connectionpool.pyc Moving to /usr/lib/python2.7/site-packages/urllib3/connectionpool.pyo from /tmp/pip-uninstall-QTETgA/connectionpool.pyo Moving to /usr/lib/python2.7/site-packages/urllib3/contrib/ from /usr/lib/python2.7/site-packages/urllib3/~ontrib Moving to /usr/lib/python2.7/site-packages/urllib3/exceptions.py from /tmp/pip-uninstall-QTETgA/exceptions.py Moving to /usr/lib/python2.7/site-packages/urllib3/exceptions.pyc from /tmp/pip-uninstall-QTETgA/exceptions.pyc Moving to /usr/lib/python2.7/site-packages/urllib3/exceptions.pyo from /tmp/pip-uninstall-QTETgA/exceptions.pyo Moving to /usr/lib/python2.7/site-packages/urllib3/fields.py from /tmp/pip-uninstall-QTETgA/fields.py Moving to /usr/lib/python2.7/site-packages/urllib3/fields.pyc from /tmp/pip-uninstall-QTETgA/fields.pyc Moving to /usr/lib/python2.7/site-packages/urllib3/fields.pyo from /tmp/pip-uninstall-QTETgA/fields.pyo Moving to /usr/lib/python2.7/site-packages/urllib3/filepost.py from /tmp/pip-uninstall-QTETgA/filepost.py Moving to /usr/lib/python2.7/site-packages/urllib3/filepost.pyc from /tmp/pip-uninstall-QTETgA/filepost.pyc Moving to /usr/lib/python2.7/site-packages/urllib3/filepost.pyo from /tmp/pip-uninstall-QTETgA/filepost.pyo Moving to /usr/lib/python2.7/site-packages/urllib3/packages/init.py from /tmp/pip-uninstall-QTETgA/packages/init.py Moving to /usr/lib/python2.7/site-packages/urllib3/packages/init.pyc from /tmp/pip-uninstall-QTETgA/packages/init.pyc Moving to /usr/lib/python2.7/site-packages/urllib3/packages/init.pyo from /tmp/pip-uninstall-QTETgA/packages/init.pyo Moving to /usr/lib/python2.7/site-packages/urllib3/packages/backports/ from /usr/lib/python2.7/site-packages/urllib3/packages/~ackports Moving to /usr/lib/python2.7/site-packages/urllib3/packages/six.py from /tmp/pip-uninstall-QTETgA/packages/six.py Moving to /usr/lib/python2.7/site-packages/urllib3/packages/six.pyc from /tmp/pip-uninstall-QTETgA/packages/six.pyc Moving to /usr/lib/python2.7/site-packages/urllib3/packages/six.pyo from /tmp/pip-uninstall-QTETgA/packages/six.pyo Moving to /usr/lib/python2.7/site-packages/urllib3/poolmanager.py from /tmp/pip-uninstall-QTETgA/poolmanager.py Moving to /usr/lib/python2.7/site-packages/urllib3/poolmanager.pyc from /tmp/pip-uninstall-QTETgA/poolmanager.pyc Moving to /usr/lib/python2.7/site-packages/urllib3/poolmanager.pyo from /tmp/pip-uninstall-QTETgA/poolmanager.pyo Moving to /usr/lib/python2.7/site-packages/urllib3/request.py from /tmp/pip-uninstall-QTETgA/request.py Moving to /usr/lib/python2.7/site-packages/urllib3/request.pyc from /tmp/pip-uninstall-QTETgA/request.pyc Moving to /usr/lib/python2.7/site-packages/urllib3/request.pyo from /tmp/pip-uninstall-QTETgA/request.pyo Moving to /usr/lib/python2.7/site-packages/urllib3/response.py from /tmp/pip-uninstall-QTETgA/response.py Moving to /usr/lib/python2.7/site-packages/urllib3/response.pyc from /tmp/pip-uninstall-QTETgA/response.pyc Moving to /usr/lib/python2.7/site-packages/urllib3/response.pyo from /tmp/pip-uninstall-QTETgA/response.pyo Moving to /usr/lib/python2.7/site-packages/urllib3/util/ from /usr/lib/python2.7/site-packages/urllib3/~til ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/usr/lib/python2.7/site-packages/urllib3/packages/ssl_match_hostname/_implementation.py'

mgarabed commented 5 years ago

There seems to be an incompatible package called "pynetbox" in there. If you start the venv from scratch do you still get that error?

Was able to verify installation for Python2.7 works on a fresh env locally.

rainierpineda2 commented 5 years ago

Yes that is likely the case…I created fresh vent and I was able to install without issues. Seems to be a conflict with incompatible requests module being used between Netbox and Riverbed. Netbox is the open source inventory management software from Digital Ocean

On May 17, 2019, at 3:39 PM, Mike Garabedian notifications@github.com wrote:

There seems to be an incompatible package called "pynetbox" in there. If you start the venv from scratch do you still get that error?

Was able to verify installation for Python2.7 works on a fresh env locally.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/riverbed/steelscript/issues/3?email_source=notifications&email_token=AHM334UR5AX3UH5KEGXVLCDPV4CXXA5CNFSM4HM5YTPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVVVXZQ#issuecomment-493575142, or mute the thread https://github.com/notifications/unsubscribe-auth/AHM334QEKIU5ME7SUBGUPXTPV4CXXANCNFSM4HM5YTPA.

mgarabed commented 5 years ago

As a workaround, you can manually upgrade requests via:

pip install "requests<3.0,>=2.20.0"

It will complain, but with the few tests I ran should otherwise work fine.

rainierpineda2 commented 5 years ago

Mike - Thanks for your help. I tried to install pynetbox after I installed successfully steelscript and they’re now playing nice with each other. I’ll keep your suggestion below with the request module in mind

On May 17, 2019, at 3:54 PM, Mike Garabedian notifications@github.com wrote:

As a workaround, you can manually upgrade requests via:

pip install "requests<3.0,>=2.20.0" It will complain, but with the few tests I ran should otherwise work fine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/riverbed/steelscript/issues/3?email_source=notifications&email_token=AHM334RWTWFKRB3BYGEATDDPV4EP5A5CNFSM4HM5YTPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVVWZGQ#issuecomment-493579418, or mute the thread https://github.com/notifications/unsubscribe-auth/AHM334T24GH727VEE7KU5NDPV4EP5ANCNFSM4HM5YTPA.