owlready2_optimized not built on OSX

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

owlready2_optimized not built on OSX

jonathanunderwood
Running this on OSX:

pip install Cython
pip install Owlready2

results in owlready2_optimized not being available:

$ python
Python 3.7.2 (default, Feb 12 2019, 08:15:36)
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import owlready2
* Owlready2 * Warning: optimized Cython parser module 'owlready2_optimized' is not available, defaulting to slower Python implementation



This is with xcode installed:
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

and with owlready2 version 0.14:

$ pip freeze
Cython==0.29.6
Owlready2==0.14


Reply | Threaded
Open this post in threaded view
|

Re: owlready2_optimized not built on OSX

jonathanunderwood
Ah, I figured this out: pip was installing owlready2 from a cached wheel built for an earlier install when Cython wasn't present. The following fixed the problem:

pip install --force-reinstall --no-cache-dir Owlready2
Reply | Threaded
Open this post in threaded view
|

Re: owlready2_optimized not built on OSX

mark
also make sure you have cython installed before (re)installing owlready2. otherwise, you will have the same problem.

sudo pip install cython