Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation issue when using homebrew python on Mac OSX #513

Closed
ghost opened this issue Aug 4, 2017 · 1 comment
Closed

Installation issue when using homebrew python on Mac OSX #513

ghost opened this issue Aug 4, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 4, 2017

$ brew install python
$  which python
/usr/local/bin/python

# may need sudo below
$ pip install ydk ydk-models-ietf
$ python
Python 2.7.13 (default, Jul 18 2017, 09:17:00)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ydk.models.ietf import ietf_interfaces as iif
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6

One workaround if using homebrew on Mac OSX is to install from source:

$ git clone https://github.com/CiscoDevNet/ydk-py.git
$ cd ydk-py/core

# may need sudo for the below. Record files for later uninstall via "cat files.txt | xargs sudo rm -rf"
$ python setup.py install --record files.txt
$ cd ../ietf
$ python setup.py install --record files.txt

The other option is to use a virtualenv:

$ virtualenv venv
$ source venv/bin/activate
(venv) $ pip install ydk ydk-models-ietf
(venv) $ python
Python 2.7.13 (default, Jul 18 2017, 09:17:00)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ydk.models.ietf import ietf_interfaces as iif
>>>
@ghost
Copy link
Author

ghost commented Oct 25, 2017

The issue turns out to be homebrew python.

Please execute brew rm python python3 to remove any homebrew python packages.

You can download the latest python package from here. Please do not use the homebrew version of python as it causes issues with installing ydk packages.

After removing homebrew python and installing any required packages from the official python website, I am able to install and use ydk without virtualenv & using virtualenv.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants