ncnn
ncnn copied to clipboard
import error
In Ubuntu 16.04 LTS,cmake,make and setup are all done. python import ncnn ModuleNotFoundError: No module named 'ncnn.ncnn'. What should I do?
pip show ncnn ?
i meet same error
this comes from the file "init.py"; in line 15 ------> [ from .ncnn import *], but no solution was found.
first install pybind11 second cd ncnn/python ' python setep.py install ' i successed in ubuntu 20.04
first install pybind11
second cd ncnn/python ' python setep.py install '
i successed in ubuntu 20.04
i follow your steps,but still has the same problem,could you give a detailed step,thx a lot!!!
first install pybind11 second cd ncnn/python ' python setep.py install ' i successed in ubuntu 20.04
i follow your steps,but still has the same problem,could you give a detailed step,thx a lot!!!
I guess you forget make the NCNN , you should first make NCNN in the markdown file in NCNN/python you can see more
first install pybind11 second cd ncnn/python ' python setep.py install ' i successed in ubuntu 20.04
i follow your steps,but still has the same problem,could you give a detailed step,thx a lot!!!
Try to build ncnn with gcc-7. The detailed steps are:
export CC=<path/of/gcc-7>
export CXX=<path/of/g++7>
cd <path/to/ncnn/root/directory>
make build
cd build
cmake .. -DNCNN_PYTHON=ON
make -j8 && make install
cd ../python
python setup.py install
i follow lvhan028 commented on 26 Sep
and in the last step not cd ../python
python setup.py install
but cd ../
pip3 install .
then is ok and you can read the readme.md in the folder named "python"
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
- First install
pybind11
- Second install
ncnn
$ pip install pybind11
$ pip install ncnn
I meet the same error in MacOS. And i have tried all the methods upstairs。
I get this too. Python package is broken
I get the same error while running from terminal. However, importing into shell / notebook works.
After building from source,
cd python
ipython
> import ncnn