03-12-2020 08:36 AM
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.
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.
Till this point it worked but then issues appeared.
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.
#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
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
With your Virtual Environment activated, you can now download and install the ACI Toolkit using git.
Full details on ACI Toolkit available in documentation
# 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.
06-19-2020 10:25 PM
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.
06-22-2020 12:34 AM - edited 06-22-2020 12:35 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide