04-25-2022 12:25 PM - edited 05-11-2022 07:31 PM
What I wish someone would have told me about installing YANG Suite
This was on a MacBook Pro, done today April 25, 2022
Enjoy!
07-07-2022 04:48 PM
I'm trying to get YangSuite installed on my Mac. I followed the above. I get this error:
#13 15.67 Downloading https://files.pythonhosted.org/packages/a1/0d/a1b490503545b3b4600b965eae5d44cc2b6ce27cfb44f4debc563dbb56d3/textfsm-0.4.1.tar.gz #13 15.91 Collecting cryptography>3.3.1 (from yangsuite-devices; extra == "core"->yangsuite[core]) #13 16.42 Downloading https://files.pythonhosted.org/packages/89/d9/5fcd312d5cce0b4d7ee8b551a0ea99e4ea9db0fdbf6dd455a19042e3370b/cryptography-37.0.4.tar.gz (585kB) #13 16.76 Complete output from command python setup.py egg_info: #13 16.76 Traceback (most recent call last): #13 16.76 File "<string>", line 1, in <module> #13 16.76 File "/tmp/pip-build-5eb_0lt0/cryptography/setup.py", line 14, in <module> #13 16.76 from setuptools_rust import RustExtension #13 16.76 ModuleNotFoundError: No module named 'setuptools_rust' #13 16.76 #13 16.76 =============================DEBUG ASSISTANCE========================== #13 16.76 If you are seeing an error here please try the following to #13 16.76 successfully install cryptography: #13 16.76 #13 16.76 Upgrade to the latest pip and try again. This will fix errors for most #13 16.76 users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip #13 16.76 =============================DEBUG ASSISTANCE========================== #13 16.76 #13 16.76 #13 16.76 ---------------------------------------- #13 17.11 Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-5eb_0lt0/cryptography/ ------ executor failed running [/bin/sh -c pip3 install --upgrade --no-cache yangsuite[core]]: exit code: 1 ERROR: Service 'yangsuite' failed to build : Build failed
I've tried upgrading pip and setuptools.
Package Version
----------------- -------
pip 22.1.2
semantic-version 2.10.0
setuptools 63.1.0
setuptools-rust 1.4.1
typing_extensions 4.3.0
How do I fix?
Thanks,
Patrick
01-05-2024 01:24 PM
It looks like you need to install cryptography and updating to the latest version of pip might help too.
07-18-2024 04:36 AM - edited 07-18-2024 04:38 AM
I deal with this Yang Suite about a month ago. By the end, I've created a new python 8 environment (3.8.19) and installed all the dependencies. Didn't see any relevant issue at that time.
In attach, you have the pip freeze, in case you like to just install the pip packages in the exact same version (pip install -r yangsuite.txt).
@bigevilbeard ,
I believe python 3.8 is the way to go now. The release 3.8 utilized in the mac install example at Yang Suite git repo.
https://github.com/CiscoDevNet/yangsuite
Hope it helps....
07-18-2024 04:45 AM
@Daniel Kratz thats interesting then, i am sure this was an issue with backports and that python version, thanks for clarifying this! Maybe if @khanhvn does tries installing it explicitly, it could fix the issue?
07-17-2024 06:44 PM
I installed Yang Suite using pip according to the instructions, but got this error whrn running yangsuite. What did I miss?
(yangsuitevenv) KHANHVN-M-81M4:~ khanhvn$ yangsuite
Traceback (most recent call last):
File "/Users/khanhvn/yangsuitevenv/bin/yangsuite", line 5, in <module>
from yangsuite.application import main
File "/Users/khanhvn/yangsuitevenv/lib/python3.8/site-packages/yangsuite/application.py", line 18, in <module>
from pkg_resources import iter_entry_points
File "/Users/khanhvn/yangsuitevenv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 93, in <module>
from jaraco.text import (
File "/Users/khanhvn/yangsuitevenv/lib/python3.8/site-packages/setuptools/_vendor/jaraco/text/__init__.py", line 12, in <module>
from jaraco.context import ExceptionTrap
File "/Users/khanhvn/yangsuitevenv/lib/python3.8/site-packages/setuptools/_vendor/jaraco/context.py", line 17, in <module>
from backports import tarfile
ImportError: cannot import name 'tarfile' from 'backports' (/Users/khanhvn/yangsuitevenv/lib/python3.8/site-packages/backports/__init__.py)
(yangsuitevenv) KHANHVN-M-81M4:~ khanhvn$ yangsuite -h
Traceback (most recent call last):
File "/Users/khanhvn/yangsuitevenv/bin/yangsuite", line 5, in <module>
from yangsuite.application import main
File "/Users/khanhvn/yangsuitevenv/lib/python3.8/site-packages/yangsuite/application.py", line 18, in <module>
from pkg_resources import iter_entry_points
File "/Users/khanhvn/yangsuitevenv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 93, in <module>
from jaraco.text import (
File "/Users/khanhvn/yangsuitevenv/lib/python3.8/site-packages/setuptools/_vendor/jaraco/text/__init__.py", line 12, in <module>
from jaraco.context import ExceptionTrap
File "/Users/khanhvn/yangsuitevenv/lib/python3.8/site-packages/setuptools/_vendor/jaraco/context.py", line 17, in <module>
from backports import tarfile
ImportError: cannot import name 'tarfile' from 'backports' (/Users/khanhvn/yangsuitevenv/lib/python3.8/site-packages/backports/__init__.py)
07-18-2024 04:10 AM
@khanhvn your error message indicates that the tarfile module cannot be imported from the backports package, guessing shis is likely because the backports.tarfile module is not compatible with Python 3.8, which is the version you are running. Create an venv and run this with Python 3.7.
Hope this helps.
07-18-2024 11:14 AM
@bigevilbeard That helps. Python 3.7 works. Thanks a lot.
07-18-2024 12:28 PM
@khanhvn Lucky guess! Can you mark as solution accepted so this helps others in case they see the same issue. Thanks
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