Cannot import Owlready library into Python
<p>I am a beginner in Python. I am working on an ontology using <a href="http://pythonhosted.org/Owlready/" rel="nofollow">owlready</a>. I've installed <code>owlready</code> library on my PyCharm IDE, but there is an issue with importing <code>owlready</code> in my python code. I've tried <code>from owlready import *</code> just like in the documentation, but it always give me:</p>

<pre><code>Traceback (most recent call last):
  File "C:/Users/siekoo/OneDrive/Development/python/NER/onto_start.py", line 1, in &lt;module&gt;
    from owlready import *
  File "C:\winpython\python-2.7.10.amd64\lib\site-packages\owlready\__init__.py", line 85
    def __init__(self, *Entities, ontology = None):
                                         ^
SyntaxError: invalid syntax
</code></pre>

<p>It looks like Owlready is for Python 3 while you're using Python 2. Change your python version for it to work.</p>

<p>The invalid syntax error is because of the new Python 3 argument lists, see: <a href="https://docs.python.org/3/tutorial/controlflow.html#arbitrary-argument-lists" rel="nofollow">https://docs.python.org/3/tutorial/controlflow.html#arbitrary-argument-lists</a></p>

python ontology