Hellowlol / bw_plex

binge watching for plex
MIT License
366 stars 23 forks source link

Error importing required packages after successful install #134

Closed jakewilliami closed 4 years ago

jakewilliami commented 4 years ago

After a successful download (which took a little while; see my PR), the executable bw_plex seems to run fine, but has this little log/error at the start of the command:

root@plex:/ # bw_plex
2020-06-20 18:05:45,319 :: bw_plex :: INFO :: __init__.py:168 :: Using bw_plex version 0.1.1.dev89+g98269f7
2020-06-20 18:05:45,320 :: bw_plex :: INFO :: __init__.py:169 :: default folder set to /root/.config/bw_plex
2020-06-20 18:05:45,404 :: bw_plex :: WARNING :: audio.py:14 :: Failed to import speech_recognition this is required to check for recaps in audio. Install the package using pip install bw_plex[audio] or bw_plex[all]
2020-06-20 18:05:45,543 :: bw_plex :: WARNING :: credits.py:16 :: Scanning for credits is not supported. Install the package with pip install bw_plex[all] or bw_plex[video]
2020-06-20 18:05:45,543 :: bw_plex :: WARNING :: credits.py:23 :: Extracting text from images is not supported. Install the package with pip install bw_plex[all] or bw_plex[video]
2020-06-20 18:05:45,551 :: bw_plex :: INFO :: plex.py:1390 :: Added signal handler.
Usage: bw_plex [OPTIONS] COMMAND [ARGS]...

  CLI tool that monitors pms and jumps the client to after the theme.

Options:
  -d, --debug                 Add debug logging.
  -u, --username TEXT         Your plex username
  -p, --password TEXT         Your plex password
  -s, --servername TEXT       The server you want to monitor.
  --url TEXT                  url to the server you want to monitor
  -t, --token TEXT            plex-x-token
  -c, --config TEXT           Path to config file.
  -vs, --verify_ssl           Enable this to allow insecure connections to PMS
  -df, --default_folder TEXT  Override for the default folder, typically used
                              by dockers.

  -n, --nice INTEGER          Set niceness of the process.
  --help                      Show this message and exit.

Commands:
  add-hash-frame          This will hash the episodes.
  add-ref-frame
  add-theme-to-hashtable  Create a hashtable from the themes.
  check-db                Do a manual check of the db.
  create-config           Create a config file.
  create-edl-from-db
  export-db               Export the db to some other format.
  ffmpeg-process          Simple manual test for ffmpeg_process with knobs...
  manually-correct-theme  Set the correct fingerprint of the show in the...
  match                   Manual match for a file.
  process                 Manual process some/all eps.
  set-manual-theme-time   Set a manual start and end time for a theme.
  test-a-movie
  test-hashing-visual
  watch                   Start watching the server for stuff to do.

So I try installing bw_plex[all] but

root@plex:/ # pip install bw_plex[all]
pip: No match.

I then try without the [all] and everything seems to be satisfied:

root@plex:/ # pip install bw_plex
Requirement already satisfied: bw_plex in /Plex Media Server/Plug-ins/src/bw-plex (0.1.1.dev89+g98269f7)
Requirement already satisfied: librosa in /usr/local/lib/python3.7/site-packages (from bw_plex) (0.7.2)
Requirement already satisfied: plexapi>=3.0.6 in /usr/local/lib/python3.7/site-packages (from bw_plex) (4.0.0)
Requirement already satisfied: joblib in /usr/local/lib/python3.7/site-packages (from bw_plex) (0.15.1)
Requirement already satisfied: numpy>=1.15.0 in /usr/local/lib/python3.7/site-packages (from bw_plex) (1.19.0)
Requirement already satisfied: docopt in /usr/local/lib/python3.7/site-packages (from bw_plex) (0.6.2)
Requirement already satisfied: click in /usr/local/lib/python3.7/site-packages (from bw_plex) (7.1.2)
Requirement already satisfied: scipy in /usr/local/lib/python3.7/site-packages (from bw_plex) (1.4.1)
Requirement already satisfied: matplotlib in /usr/local/lib/python3.7/site-packages (from bw_plex) (2.2.4)
Requirement already satisfied: psutil in /usr/local/lib/python3.7/site-packages (from bw_plex) (5.7.0)
Requirement already satisfied: srt in /usr/local/lib/python3.7/site-packages (from bw_plex) (3.3.0)
Requirement already satisfied: sqlalchemy in /usr/local/lib/python3.7/site-packages (from bw_plex) (1.3.17)
Requirement already satisfied: configobj in /usr/local/lib/python3.7/site-packages (from bw_plex) (5.0.6)
Requirement already satisfied: youtube-dl in /usr/local/lib/python3.7/site-packages (from bw_plex) (2020.6.16.1)
Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.7/site-packages (from bw_plex) (4.9.1)
Requirement already satisfied: html5lib in /usr/local/lib/python3.7/site-packages (from bw_plex) (1.0.1)
Requirement already satisfied: tablib in /usr/local/lib/python3.7/site-packages (from bw_plex) (2.0.0)
Requirement already satisfied: lomond>=0.3.3 in /usr/local/lib/python3.7/site-packages (from bw_plex) (0.3.3)
Requirement already satisfied: PyChromecast>=3.2.2 in /usr/local/lib/python3.7/site-packages (from bw_plex) (6.0.0)
Requirement already satisfied: pysubs2>=0.2.4 in /usr/local/lib/python3.7/site-packages (from bw_plex) (0.2.4)
Requirement already satisfied: scikit-learn!=0.19.0,>=0.14.0 in /usr/local/lib/python3.7/site-packages (from librosa->bw_plex) (0.23.1)
Requirement already satisfied: audioread>=2.0.0 in /usr/local/lib/python3.7/site-packages (from librosa->bw_plex) (2.1.8)
Requirement already satisfied: resampy>=0.2.2 in /usr/local/lib/python3.7/site-packages (from librosa->bw_plex) (0.2.2)
Requirement already satisfied: numba>=0.43.0 in /usr/local/lib/python3.7/site-packages (from librosa->bw_plex) (0.47.0)
Requirement already satisfied: soundfile>=0.9.0 in /usr/local/lib/python3.7/site-packages (from librosa->bw_plex) (0.10.3.post1)
Requirement already satisfied: decorator>=3.0.0 in /usr/local/lib/python3.7/site-packages (from librosa->bw_plex) (4.4.2)
Requirement already satisfied: six>=1.3 in /usr/local/lib/python3.7/site-packages (from librosa->bw_plex) (1.15.0)
Requirement already satisfied: requests in /usr/local/lib/python3.7/site-packages (from plexapi>=3.0.6->bw_plex) (2.24.0)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/site-packages (from matplotlib->bw_plex) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/site-packages (from matplotlib->bw_plex) (2.4.7)
Requirement already satisfied: python-dateutil>=2.1 in /usr/local/lib/python3.7/site-packages (from matplotlib->bw_plex) (2.8.1)
Requirement already satisfied: pytz in /usr/local/lib/python3.7/site-packages (from matplotlib->bw_plex) (2020.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/site-packages (from matplotlib->bw_plex) (1.1.0)
Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.7/site-packages (from beautifulsoup4->bw_plex) (2.0.1)
Requirement already satisfied: webencodings in /usr/local/lib/python3.7/site-packages (from html5lib->bw_plex) (0.5.1)
Requirement already satisfied: protobuf>=3.0.0 in /usr/local/lib/python3.7/site-packages (from PyChromecast>=3.2.2->bw_plex) (3.12.2)
Requirement already satisfied: zeroconf>=0.25.1 in /usr/local/lib/python3.7/site-packages (from PyChromecast>=3.2.2->bw_plex) (0.27.1)
Requirement already satisfied: casttube>=0.2.0 in /usr/local/lib/python3.7/site-packages (from PyChromecast>=3.2.2->bw_plex) (0.2.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in /usr/local/lib/python3.7/site-packages (from scikit-learn!=0.19.0,>=0.14.0->librosa->bw_plex) (2.1.0)
Requirement already satisfied: llvmlite>=0.31.0dev0 in /usr/local/lib/python3.7/site-packages (from numba>=0.43.0->librosa->bw_plex) (0.31.0)
Requirement already satisfied: setuptools in /usr/local/lib/python3.7/site-packages (from numba>=0.43.0->librosa->bw_plex) (44.0.0)
Requirement already satisfied: cffi>=1.0 in /usr/local/lib/python3.7/site-packages (from soundfile>=0.9.0->librosa->bw_plex) (1.14.0)
Requirement already satisfied: idna<3,>=2.5 in /usr/local/lib/python3.7/site-packages (from requests->plexapi>=3.0.6->bw_plex) (2.9)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.7/site-packages (from requests->plexapi>=3.0.6->bw_plex) (1.25.9)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.7/site-packages (from requests->plexapi>=3.0.6->bw_plex) (2020.6.20)
Requirement already satisfied: chardet<4,>=3.0.2 in /usr/local/lib/python3.7/site-packages (from requests->plexapi>=3.0.6->bw_plex) (3.0.4)
Requirement already satisfied: ifaddr in /usr/local/lib/python3.7/site-packages (from zeroconf>=0.25.1->PyChromecast>=3.2.2->bw_plex) (0.1.7)
Requirement already satisfied: pycparser in /usr/local/lib/python3.7/site-packages (from cffi>=1.0->soundfile>=0.9.0->librosa->bw_plex) (2.20)

Any idea why this might be happening?

P.S., thanks so much for this application! It is very neat. I am yet to actually try it out due to installation issues, so I will let you know what I think it terms of useability.

Hellowlol commented 4 years ago

Without [all] not all the packages is installed by default.

Some packages can be problematic to install. The packages your missing is:

extra_audio = ['pocketsphinx', 'SpeechRecognition'] extra_video = ['pytesseract', 'opencv-contrib-python']

Maybe no package is available for your platform.

Use pip -v install bw_plex[all] to see a verbose output.

Ps: bw_plex is work fine without these but will not be able to find credits or recaps.

jakewilliami commented 4 years ago

pip -v install bw_plex[all] still isn't finding anything. I fixed this by running

pkg install sphinx3 swig30 py37-opencv
pip install SpeechRecognition pytesseract

BSD is weird man, I'm used to Linux :stuck_out_tongue: Thanks for your help!