私はgithubのからこのOpenCVのプロジェクトに適用しようとしています: https://github.com/andrewssobral/simple_vehicle_countingはImportError:いいえモジュールの名前PBAS
私はLinux上でのpythonの方法で行ってきましたが、これは私がトラブルを抱えているインポート行です:
the error messageTraceback (most recent call last):
File "./build/python/demo.py", line 6, in <module>
import bgs.pbas as pbas
File "/home/user/Downloads/simple_vehicle_counting-master/build/python/bgs/pbas/__init__.py", line 1, in <module>
from pbas import *
ImportError: No module named pbas
と:
from __future__ import print_function
import cv2
import analysis
import tracking
import bgs.pbas as pbas
最後の行は、このエラーの原因となるものですPBASのinitファイル内のコードです:
from pbas import *
# noinspection PyUnresolvedReferences
import pyboostcvconverter as pbcvt
注:
from analysis import *
# noinspection PyUnresolvedReferences
import cvb
# noinspection PyUnresolvedReferences
import pyboostcvconverter as pbcvt
:最初の1
import analysis
のような他の輸入は初期化ファイルは非常に似ており、これは、分析の初期化ファイルであっても正常に動作しています
私が見たときにbgs.pbasため '__init__'内で正確に何ではありません:Pythonはここにインポートするモジュールを検索する場所の詳細。私は 'import _pbas'を見ます。なぜあなたは何か違うものがあるのか分かりませんが、その小さなアンダースコアは事を説明するかもしれません。 – RobertB