cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1105
Views
6
Helpful
25
Replies
Cisco Employee

Re: pip install ydk fails on Mac

Can you please try the below?

 

 

git clone https://github.com/CiscoDevNet/ydk-gen.git -b 0.7.2
cd ydk-gen
pip install -r requirements.txt
./generate --libydk
sudo make -C gen-api/cpp/ydk/build install

# install ydk-py
sudo pip install ydk ydk-models-cisco-ios-xe

 

 

Cisco Employee

Re: pip install ydk fails on Mac

ochi$virtualenv venv

Using base prefix '/Library/Frameworks/Python.framework/Versions/3.6'

New python executable in /YANG/venv/bin/python3.6

Also creating executable in /YANG/venv/bin/python

Installing setuptools, pip, wheel...done.

Mochi$source venv/bin/activate

 

(venv) Mochi$cd venv

(venv) Mochi$git clone https://github.com/CiscoDevNet/ydk-gen.git -b 0.7.2

Cloning into 'ydk-gen'...

remote: Counting objects: 15932, done.

remote: Compressing objects: 100% (87/87), done.

remote: Total 15932 (delta 42), reused 61 (delta 31), pack-reused 15813

Receiving objects: 100% (15932/15932), 6.57 MiB | 5.24 MiB/s, done.

Resolving deltas: 100% (11220/11220), done.

Note: checking out '55dccd546f93e588d08bd4a19ccc59b9a1a3db37'.

 

You are in 'detached HEAD' state. You can look around, make experimental

changes and commit them, and you can discard any commits you make in this

state without impacting any branches by performing another checkout.

 

If you want to create a new branch to retain commits you create, you may

do so (now or later) by using -b with the checkout command again. Example:

 

  git checkout -b <new-branch-name>

 

(venv) Mochi$cd ydk-gen

(venv) Mochi$./generate --libydk

-bash: ./generate: No such file or directory

(venv) Mochi$./generate.py --libydk

Traceback (most recent call last):

  File "./generate.py", line 34, in <module>

    from git import Repo

ModuleNotFoundError: No module named 'git'

(venv) Mochi$pip install git

Collecting git

  Could not find a version that satisfies the requirement git (from versions: )

No matching distribution found for git

(venv) Mochi$

Cisco Employee

Re: pip install ydk fails on Mac

please run the below command to install dependencies:

cd ydk-gen/
pip install -r requirements.txt
Cisco Employee

Re: pip install ydk fails on Mac

That make "./generate.py --libydk" working"

 

But:

 

(venv27) Mochi$sudo make -C gen-api/cpp/ydk install

make: *** No rule to make target `install'.  Stop.

 

 

Cisco Employee

Re: pip install ydk fails on Mac

Sorry. Another typo. Should be:

sudo make -C gen-api/cpp/ydk/build install
Cisco Employee

Re: pip install ydk fails on Mac

Thanks, now is working.

To recap: These steps fix the issue.

 

git clone https://github.com/CiscoDevNet/ydk-gen.git -b 0.7.2
cd ydk-gen
pip install -r requirements.txt
./generate --libydk
sudo make -C gen-api/cpp/ydk/build install

# install ydk-py
sudo pip install ydk ydk-models-cisco-ios-xe

 

 

Beginner

Re: pip install ydk fails on Mac

Hi I tried these but I couldn't. Error occurred while generating libydk.
Is there any resolution?
It is High sierra 10.13.6

Thanks

 

---
(YDKenv) MacBookPro-2:YDKenv takumi$ pip list
Package Version
---------- -------
pip 18.0
setuptools 40.2.0
wheel 0.31.1
(YDKenv) MacBookPro-2:YDKenv takumi$ git clone https://github.com/CiscoDevNet/ydk-gen.git -b 0.7.2
Cloning into 'ydk-gen'...
remote: Counting objects: 15973, done.
remote: Compressing objects: 100% (71/71), done.
remote: Total 15973 (delta 51), reused 55 (delta 32), pack-reused 15870
Receiving objects: 100% (15973/15973), 6.57 MiB | 59.00 KiB/s, done.
Resolving deltas: 100% (11266/11266), done.
Note: checking out '55dccd546f93e588d08bd4a19ccc59b9a1a3db37'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

git checkout -b <new-branch-name>

(YDKenv) MacBookPro-2:YDKenv takumi$ cd ydk-gen
(YDKenv) MacBookPro-2:ydk-gen takumi$ pip install -r requirements.txt

Successfully installed GitPython-1.0.1 Jinja2-2.10 MarkupSafe-1.0 Pygments-2.2.0 Sphinx-1.4a1 alabaster-0.7.11 babel-2.6.0 docutils-0.14 gitdb-0.6.4 imagesize-1.1.0 pyang-1.6 pytz-2018.5 rstr-2.2.6 six-1.11.0 smmap-0.9.0 snowballstemmer-1.2.1 sphinx-rtd-theme-0.1.9
(YDKenv) MacBookPro-2:ydk-gen takumi$ ./generate --libydk
-bash: ./generate: No such file or directory
(YDKenv) MacBookPro-2:ydk-gen takumi$ ./generate.py --libydk

Time taken for code/doc generation: 0 seconds


Creating cpp package...

-- The C compiler identification is AppleClang 10.0.0.10001025
-- The CXX compiler identification is AppleClang 10.0.0.10001025
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake System: MacOS
-- Found LibXml2: /usr/lib/libxml2.dylib (found version "2.9.4")
Set libyang plugin installation directory to: lib/libyang
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.8.14") found components: doxygen dot
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ssh_threads_location
linked by target "ydk" in directory /Users/takumi/Documents/YDK/YDKenv/ydk-gen/gen-api/cpp/ydk

-- Configuring incomplete, errors occurred!
See also "/Users/takumi/Documents/YDK/YDKenv/ydk-gen/gen-api/cpp/ydk/build/CMakeFiles/CMakeOutput.log".

ERROR: Failed to configure build!

(YDKenv) MacBookPro-2:ydk-gen takumi$

 

Highlighted
Cisco Employee

Re: pip install ydk fails on Mac

The error says libssh is missing. Have you installed 'brew install libssh' as specified in README?



CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ssh_threads_location
linked by target "ydk" in directory /Users/takumi/Documents/YDK/YDKenv/ydk-gen/gen-api/cpp/ydk
Beginner

Re: pip install ydk fails on Mac

Thanks, but already installed libssh.
and reinstalled libssh but still error.

 

(YDKenv) MacBookPro-2:ydk-gen takumi$ brew install libssh
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core, homebrew/cask).
==> New Formulae
carla hyperkit
==> Updated Formulae
apr glm metabase povray uhd
brew-gem gradle mmark pqiv vagrant-completion
cmark-gfm heroku orc-tools profanity webpack
consul homebank packer rebar3
fabric jenkins-lts pgbadger sbt
flow libspectre php selenium-server-standalone
ghostscript lz4 php@7.0 shellharden

Warning: libssh 0.8.1 is already installed and up-to-date
To reinstall 0.8.1, run `brew reinstall libssh`
(YDKenv) MacBookPro-2:ydk-gen takumi$ ./generate.py --libydk

Time taken for code/doc generation: 0 seconds


Creating cpp package...

-- The C compiler identification is AppleClang 10.0.0.10001025
-- The CXX compiler identification is AppleClang 10.0.0.10001025
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake System: MacOS
-- Found LibXml2: /usr/lib/libxml2.dylib (found version "2.9.4")
Set libyang plugin installation directory to: lib/libyang
-- Found Doxygen: /usr/local/bin/doxygen (found version "1.8.14") found components: doxygen dot
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ssh_threads_location
linked by target "ydk" in directory /Users/takumi/Documents/YDK/YDKenv/ydk-gen/gen-api/cpp/ydk

-- Configuring incomplete, errors occurred!
See also "/Users/takumi/Documents/YDK/YDKenv/ydk-gen/gen-api/cpp/ydk/build/CMakeFiles/CMakeOutput.log".

ERROR: Failed to configure build!

Cisco Employee

Re: pip install ydk fails on Mac

It looks like libssh 0.8.0 and later does not support separate threading library (see http://api.libssh.org/master/libssh_tutor_threads.html).

Can you try installing older version of libssh (older than 0.8.0)?

Beginner

Re: pip install ydk fails on Mac

Thank you abhirame. solved, and trying YDK.

Content for Community-Ad
August's Community Spotlight Awards