cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
915
Views
5
Helpful
1
Replies

Intersight Python SDK module missing the intersight_api_client.py file

a11024
Level 1
Level 1

Hi there,

 

I was trying the Python snippet code of Example 9-16 of Cisco 900-201 OCG. The first line

 

from intersight.intersight_api_client import IntersightApiClient

 gave me this error message:

 

 david_smith@darwin:~$ python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from intersight.intersight_api_client import IntersightApiClient
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'intersight.intersight_api_client'

 

 [1] intersight was installed:

 

 david_smith@darwin:~$ pip3 list | grep -i intersight
Intersight-OpenAPI 1.0.9.4246

 

[2] intersight_api_client.py file was not there

  david_smith@darwin:~$ sudo updated

  david_sith@darwin:~$ locate -i intersight | grep -i api_clien
  /usr/local/lib/python3.7/dist-packages/intersight/__pycache__/api_client.cpython-37.pyc
  /usr/local/lib/python3.7/dist-packages/intersight/api_client.py

 

[3] intersight was installed using this command and URL

   sudo pip3 install https://cdn.intersight.com/components/an-apidocs/1.0.9-4246/model/intersight_python_sdk_v3_1.0.9.4246.tar.gz

 

   The URL was copied and pasted from the link on this page: https://intersight.com/apidocs/downloads/

 

[4] The above error message happened on my Linux VM in the cloud. Same error message happened on my Windows 10 laptop, with Python version being 3.7.4 instead of 3.73. in my linux VM.

 

Someone there can confirm this is the case or I did something wrong? 

 

Sincerely,

Patrick

 

 

 

 

 

 

 

1 Accepted Solution

Accepted Solutions

a11024
Level 1
Level 1
pip install git+https://github.com/CiscoUcs/intersight-python.git

Problem solved by using the above URL shown in this link https://community.cisco.com/t5/data-center-documents/intersight-universal-api-calls/ta-p/3873248 

View solution in original post

1 Reply 1

a11024
Level 1
Level 1
pip install git+https://github.com/CiscoUcs/intersight-python.git

Problem solved by using the above URL shown in this link https://community.cisco.com/t5/data-center-documents/intersight-universal-api-calls/ta-p/3873248