stefanseefeld / faber

Faber
https://stefanseefeld.github.io/faber
Boost Software License 1.0
14 stars 2 forks source link

cannot install on ubuntu 16.04 #4

Closed MogicianWu closed 5 years ago

MogicianWu commented 6 years ago

Hi I'm trying to use this tool to install Boost.python from https://github.com/boostorg/python.git commit number bd7b8ecba5c211c3361c4a9af82a7a527bed384e.

After I cloned from this repo and ran python setup.py build

I ran py.test test to check the installation. I got the following error: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/_pytest/config.py", line 319, in _importconftest mod = conftestpath.pyimport() File "/usr/lib/python2.7/dist-packages/py/_path/local.py", line 650, in pyimport __import__(modname) File "/home/mogicican/Downloads/faber/tests/conftest.py", line 10, in <module> from faber import scheduler ImportError: No module named faber ERROR: could not load /home/mogicican/Downloads/faber/tests/conftest.py

g4nym3de commented 6 years ago

Hey! exact same issue here, running Ubuntu 16.04.3 LTS

Traceback (most recent call last):
  File "/home/garyfan/anaconda2/lib/python2.7/site-packages/_pytest/config.py", line 379, in _importconftest
    mod = conftestpath.pyimport()
  File "/home/garyfan/anaconda2/lib/python2.7/site-packages/py/_path/local.py", line 662, in pyimport
    __import__(modname)
  File "/home/garyfan/anaconda2/lib/python2.7/site-packages/_pytest/assertion/rewrite.py", line 212, in load_module
    py.builtin.exec_(co, mod.__dict__)
  File "/home/garyfan/anaconda2/lib/python2.7/site-packages/py/_builtin.py", line 221, in exec_
    exec2(obj, globals, locals)
  File "<string>", line 7, in exec2
  File "/home/garyfan/Downloads/faber-snapshot-2018-04-08/tests/conftest.py", line 10, in <module>
    from faber import scheduler
ImportError: No module named faber
ERROR: could not load /home/garyfan/Downloads/faber-snapshot-2018-04-08/tests/conftest.py
Alan-Penkar commented 6 years ago

Same issue - Ubuntu 17.10

Traceback (most recent call last):
File "/home/alan/.pyenv/versions/3.5.3/envs/NNDS/lib/python3.5/site-packages/_pytest/config.py", line 342, in _getconftestmodules
return self._path2confmods[path]
KeyError: local('/home/alan/Downloads/faber-release-0.2/tests')

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/alan/.pyenv/versions/3.5.3/envs/NNDS/lib/python3.5/site-packages/_pytest/config.py", line 373, in _importconftest
return self._conftestpath2mod[conftestpath]
KeyError: local('/home/alan/Downloads/faber-release-0.2/tests/conftest.py')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/alan/.pyenv/versions/3.5.3/envs/NNDS/lib/python3.5/site-packages/_pytest/config.py", line 379, in _importconftest
mod = conftestpath.pyimport()
File "/home/alan/.pyenv/versions/3.5.3/envs/NNDS/lib/python3.5/site-packages/py/_path/local.py", line 668, in pyimport
__import__(modname)
File "/home/alan/.pyenv/versions/3.5.3/envs/NNDS/lib/python3.5/site-packages/_pytest/assertion/rewrite.py", line 212, in load_module
py.builtin.exec_(co, mod.__dict__)
File "/home/alan/Downloads/faber-release-0.2/tests/conftest.py", line 10, in <module>
from faber import scheduler
ImportError: No module named 'faber'
ERROR: could not load /home/alan/Downloads/faber-release-0.2/tests/conftest.py
stefanseefeld commented 6 years ago

@MogicianWu , @g4nym3de , @Alan-Penkar , if all you did is running python setup.py build, you haven't installed faber yet, so it's normal that Python can't find the package. To install you have to run python setup.py install (possibly using the --prefix option to specify the install location. If you do not want to install faber properly and still test / use it you have to set the PYTHONPATH environment variable to point to your build tree (something like pwd/build/lib.linux-x86_6-2.7/ or similar).

mloskot commented 6 years ago

The instruction on how to build & test with and without installation should go to README :-)

~/faber$ lsb_release -d
Description:    Ubuntu 18.04.1 LTS
~/faber$ sudo apt install python3 libpython3-dev python3-pytest
~/faber$ python3 setup.py build
~/faber$ export PYTHONPATH=$PWD/build/lib.linux-x86_64-3.6
~/faber$ python3 -c "import faber; print(faber.__path__)"
['/home/mloskot/faber/build/lib.linux-x86_64-3.6/faber']
~/faber$ pytest-3 tests
stefanseefeld commented 6 years ago

I agree !

stefanseefeld commented 5 years ago

I have adjusted the README, and refined the wiki a bit (notably https://github.com/stefanseefeld/faber/wiki/Getting-Started%3A-Building-Faber). Please help me adding relevant information there. Meanwhile, I'm going to close this issue.

mloskot commented 5 years ago

Thanks