Installation fails

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

Installation fails

ChristophB
Hello,

i tried to install owlready2 version 0.27 on Windows 10 and got the following error:

ValueError: path '/home/jiba/src/owlready2/__init__.py' cannot be absolute

Traceback in setup.py:
File "C:\Users\xxxxx\AppData\Local\Temp\pip-install-0g81qucw\owlready2_a49efff39c2b4ea6bea6cef79a43bd0a\setup.py", line 77, in <module>
    dist = do_setup(extensions)
File "C:\Users\xxxxx\AppData\Local\Temp\pip-install-0g81qucw\owlready2_a49efff39c2b4ea6bea6cef79a43bd0a\setup.py", line 68, in do_setup
    ext_modules = extensions,
File "c:\users\xxxxx\appdata\local\programs\python\python37\lib\site-packages\setuptools\__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)

My setup is:
Python 3.7
pip 21.0.1

Best regards,
Christoph
Reply | Threaded
Open this post in threaded view
|

Re: Installation fails

Embraysite
Hi, i had the same issue.

Try to install it manually :

you can install Owlready2 manually : download the sources here : https://pypi.org/project/Owlready2/
extract it where you want

then run in a terminal:

cd </path/to/Owlready2>
python setup.py build
cd /
python <path/to/setup.py> install # you need to be as root because setup.py is bugged and can't get a proper path







Source :
https://stackoverflow.com/questions/56651258/problem-while-installing-owlready2-python-lib-in-ubuntu
Reply | Threaded
Open this post in threaded view
|

Re: Installation fails

fiveop
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Installation fails

cknoll
In reply to this post by ChristophB
The problem is that the file Owlready2.egg-info/SOURCES.txt contains absolute paths. This is caused by a change that was introduced in (as fiveop pointed out) this commit by me. Sorry for that. :-(

The problem seems only to be triggered on Windows – which I did not test.

I try to provide a solution soon. Until then the quick workaround is to simply use

pip install owlready2==0.26

Best,
Carsten
Reply | Threaded
Open this post in threaded view
|

Re: Installation fails

Jiba
Administrator
Hi,

The new 0.28 release fixes the problem.

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Installation fails

fiveop
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Installation fails

cknoll
@fiveop

Thank you, for the provided information. However, I do not understand the use case deep enough to propose a solution.

[Background]:
I submitted the original change to enable the `pip install -e .` mechanism for owlready. This turned out to be nontrivial without changing its current directory structure – which should be kept for compatibility reasons.

Because I introduced the current behavior I feel somehow responsible for it and I want to contribute to fix this.
[/Background]

To work on this, the following information would help:

- What is the expected outcome of your use case `python setup.py pytest` (I tried your minimal example and got no apparent error)
- What operating system are you working on? (apparently installation on windows might behave differently than on Linux)
- How does one setup a local pypi repository (this seems to be needed for debugging and testing)


I think this issue might require some further communication, which probably is too special for the interest of the whole Owlready2 mainling list. Therefore, I propose, you fetch my email address from the commit  (→ "View raw commit") and contact me personally. Then, hopefully, we could resolve this quickly. I am also open to have a short screen sharing session if that helps.

Best, Carsten
Reply | Threaded
Open this post in threaded view
|

Re: Installation fails

Jiba
Administrator
In reply to this post by fiveop
Hi,

The 0.28 version fixes the installation on Windows (at least it worked for me in a VM), and solved the "ValueError: path '...' cannot be absolute" error.

However, it appears that it does not fixes the problem of "indirect" installation, as a dependence. As you mentioned, the problem is possibly caused by the use of __name__ in setup.py.

I will try to replace it by __file__ ; do you think it could solve the problem?

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Installation fails

Jiba
Administrator
In reply to this post by fiveop
Hi,

I've just released Owlready 0.29, which should fix this problem. I sucessfully ran your test with pytest; could you confirm it is Ok?

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Installation fails

fiveop
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Installation fails

fiveop
In reply to this post by cknoll
CONTENTS DELETED
The author has deleted this message.