microsoft / ELL

Embedded Learning Library
https://microsoft.github.io/ELL
Other
2.29k stars 295 forks source link

Import error "ELL build folder not found" #215

Closed dashesy closed 5 years ago

dashesy commented 5 years ago

Why is

make _ELL_python

needed as a separate build instruction? If Python 3.6+ is found can we always build it?

I build with

mkdir build; cd build
cmake ..
make

and it succeeds, but then I get this error

$ python tools/importers/onnx/onnx_import.py ~/model.onnx
Traceback (most recent call last):
  File "tools/importers/onnx/onnx_import.py", line 23, in <module>
    import find_ell
  File "/home/ehazar/repos/ELL/tools/importers/onnx/../../utilities/pythonlibs/find_ell.py", line 55, in <module>
    ell_build_dir = find_ell_build()
  File "/home/ehazar/repos/ELL/tools/importers/onnx/../../utilities/pythonlibs/find_ell.py", line 49, in find_ell_build
    raise Exception("ELL build folder not found in {}\nFound:{}".format(head, os.listdir(head)))
Exception: ELL build folder not found in /home/ehazar/repos/ELL
Found:['SETUP-Windows.cmd', 'build', '.travis.yml', '.gitignore', 'tools', 'Dockerfile', '.editorconfig', '.git', 'Doxyfile', 'Pipfile', 'libraries', 'rebuild.cmd', 'INSTALL-Ubuntu.md', 'CMake', 'docs', '.flake8', 'build.cmd', 'Versioning.md', 'requirements.txt', 'INSTALL-Advanced.md', 'LICENSE.txt', '.clang-format', 'interfaces', '_config.yml', 'CMakeLists.txt', 'INSTALL-Mac.md', 'StyleGuide.md', 'Gemfile', 'INSTALL-Windows.md', '.gitattributes', 'SETUP-Ubuntu.sh', 'VERSION', 'build.sh', 'README.md', 'examples', 'Pipfile.lock', 'external']

The error is confusing, because there is clearly a build directory there and is also in Found in the error message. So I do not know what is the error.

dashesy commented 5 years ago

I had to install also -dev for Python3.6 before cmake. In Ubuntu16:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6
sudo apt-get install python3.6-dev
lovettchris commented 5 years ago

Interesting - are you using the miniconda setup outlined in INSTALL-Ubuntu.md ?

dashesy commented 5 years ago

No I installed Python3.6 with apt. You are correct Miniconda would have been preferable, with no issues.

lovettchris commented 5 years ago

ok, cool, thanks for the info.

dashesy commented 5 years ago

Btw the reason I try avoiding conda is that it ships its own libraries, that some times could cause hard to understand issues.

This is a warning for example, that I see when using conda environment:

  Cannot generate a safe runtime search path for target debugCompiler because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libffi.so.6] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/ehsan/miniconda3/lib

  Some of these libraries may not be found correctly