cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1443
Views
0
Helpful
2
Replies

Devnet Learning Lab Centos environment setup error

bascisco
Cisco Employee
Cisco Employee

Hello,


 I am not sure if this is 100% the right forum to give feedback on the Devnet Learning labs.

I started my endeavor into further enhancing my automation skills.

 

With one of the first labs setting up the required Workstation  using CENTOS 8.1 I ran into several issues.

Most of the errors reported I could resolve with some online research.  However the below procedure isn't fool proof and for some people might cause a setback.

 

Workstation Setup Instructions

This lab can be completed from a Windows, Mac, or Linux workstation as long as the above pre-reqs are installed. To assist with lab completion, here are some suggested steps to prepare common platforms.

If your environment requires a proxy server to access Internet resources, be sure that it is configured correctly on your system, and adjust any steps/commands listed below as needed.

Install Python

  • CentOS Sample Setup Instructions Example
    • Standard Development Tools
      1. sudo yum -y groupinstall development
    • Python 3.7.5
      1. sudo yum -y install gcc
      2. sudo yum -y install wget
      3. sudo wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz
      4. sudo tar xzf Python-3.7.5.tgz
      5. cd Python-3.7.5
      6. sudo./configure --enable-optimizations
      7. sudo make altinstall
    • OpenSSL Development Library
      1. sudo yum -y install openssl-devel

Till this point it worked but then issues appeared.

 

Pull Down Sample Code and Prep Python Environment

With the software pre-reqs installed on your workstation, clone the sample code from GitHub, setup the Python environment, and install any Python requirements with pip.

  • MAC or Linux
#From your working directory
git clone https://github.com/CiscoDevNet/aci-learning-labs-code-samples
cd aci-learning-labs-code-samples
python3.7 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
  

At this point I got error message like this:

WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

 

Which I resolved via this info:

Install the necessary packages for Python and ssl: $ sudo yum install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

 

Install ACI Toolkit

With your Virtual Environment activated, you can now download and install the ACI Toolkit using git.

Full details on ACI Toolkit available in documentation

  • MAC or Linux or Windows
# From your working directory
git clone https://github.com/datacenter/acitoolkit.git
cd acitoolkit
python setup.py install

Here I got the next issues reported:

 

(venv) [bas@localhost ~]$ cd acitoolkit/
(venv) [bas@localhost acitoolkit]$ python setup.py install
Traceback (most recent call last):
File "setup.py", line 5, in <module>
from setuptools import setup
File "/home/bas/aci-learning-labs-code-samples/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 20, in <module>
from setuptools.dist import Distribution, Feature
File "/home/bas/aci-learning-labs-code-samples/venv/lib/python3.7/site-packages/setuptools/dist.py", line 35, in <module>
from setuptools import windows_support
File "/home/bas/aci-learning-labs-code-samples/venv/lib/python3.7/site-packages/setuptools/windows_support.py", line 2, in <module>
import ctypes
File "/usr/local/lib/python3.7/ctypes/__init__.py", line 7, in <module>
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
(venv) [bas@localhost acitoolkit]$ cd ,,
bash: cd: ,,: No such file or directory

I have not yet resolved this.

 

Brgds,


Bas.

2 Replies 2

LanDownUnda
Spotlight
Spotlight

Hi bascisco,

 

This is some great feedback! I can see the error you hit is triggered because you don't seem to have the module 'ctypes' available on your directory to call it in your script.

 

I imagine once this is resolved then you'll have that script working.

 

*** Rate All Helpful Responses ***

Hello LanDownUnda,

 

Thank you for your reply.  I will check that out. I hope though that the Devnet Team fixes this or makes the installation fool-proof. For many this is their first step into automation and programming and people might not be so savvy with Linux, python, install scripts at the start.


Brgds, Bas.