duongxthanh / facebook-reels-downloader

Download all Facebook reels with a single command.
MIT License
20 stars 7 forks source link

ModuleNotFoundError: No module named 'selenium' #1

Open droopy4u opened 4 months ago

droopy4u commented 4 months ago
  1. installation packages

command to install the required packages yt-dlp and selenium : facebook-reels-downloader$ pip3 install -r requirements.txt

output : Requirement already satisfied: selenium in /usr/local/lib/python3.11/site-packages (from -r requirements.txt (line 1)) (4.22.0) Requirement already satisfied: yt-dlp in /usr/local/lib/python3.11/site-packages (from -r requirements.txt (line 2)) (2024.7.1) Requirement already satisfied: urllib3<3,>=1.26 in /usr/local/lib/python3.11/site-packages (from urllib3[socks]<3,>=1.26->selenium->-r requirements.txt (line 1)) (2.0.4) Requirement already satisfied: trio~=0.17 in /usr/local/lib/python3.11/site-packages (from selenium->-r requirements.txt (line 1)) (0.25.1) Requirement already satisfied: trio-websocket~=0.9 in /usr/local/lib/python3.11/site-packages (from selenium->-r requirements.txt (line 1)) (0.11.1) Requirement already satisfied: certifi>=2021.10.8 in /usr/local/lib/python3.11/site-packages (from selenium->-r requirements.txt (line 1)) (2023.7.22) Requirement already satisfied: typing_extensions>=4.9.0 in /usr/local/lib/python3.11/site-packages (from selenium->-r requirements.txt (line 1)) (4.9.0) Requirement already satisfied: websocket-client>=1.8.0 in /usr/local/lib/python3.11/site-packages (from selenium->-r requirements.txt (line 1)) (1.8.0) Requirement already satisfied: brotli in /usr/local/lib/python3.11/site-packages (from yt-dlp->-r requirements.txt (line 2)) (1.1.0) Requirement already satisfied: mutagen in /usr/local/lib/python3.11/site-packages (from yt-dlp->-r requirements.txt (line 2)) (1.47.0) Requirement already satisfied: pycryptodomex in /usr/local/lib/python3.11/site-packages (from yt-dlp->-r requirements.txt (line 2)) (3.20.0) Requirement already satisfied: requests<3,>=2.32.2 in /usr/local/lib/python3.11/site-packages (from yt-dlp->-r requirements.txt (line 2)) (2.32.3) Requirement already satisfied: websockets>=12.0 in /usr/local/lib/python3.11/site-packages (from yt-dlp->-r requirements.txt (line 2)) (12.0) Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/site-packages (from requests<3,>=2.32.2->yt-dlp->-r requirements.txt (line 2)) (3.2.0) Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/site-packages (from requests<3,>=2.32.2->yt-dlp->-r requirements.txt (line 2)) (3.4) Requirement already satisfied: attrs>=23.2.0 in /usr/local/lib/python3.11/site-packages (from trio~=0.17->selenium->-r requirements.txt (line 1)) (23.2.0) Requirement already satisfied: sortedcontainers in /usr/local/lib/python3.11/site-packages (from trio~=0.17->selenium->-r requirements.txt (line 1)) (2.4.0) Requirement already satisfied: outcome in /usr/local/lib/python3.11/site-packages (from trio~=0.17->selenium->-r requirements.txt (line 1)) (1.3.0.post0) Requirement already satisfied: sniffio>=1.3.0 in /usr/local/lib/python3.11/site-packages (from trio~=0.17->selenium->-r requirements.txt (line 1)) (1.3.1) Requirement already satisfied: wsproto>=0.14 in /usr/local/lib/python3.11/site-packages (from trio-websocket~=0.9->selenium->-r requirements.txt (line 1)) (1.2.0) Requirement already satisfied: pysocks!=1.5.7,<2.0,>=1.5.6 in /usr/local/lib/python3.11/site-packages (from urllib3[socks]<3,>=1.26->selenium->-r requirements.txt (line 1)) (1.7.1) Requirement already satisfied: h11<1,>=0.9.0 in /usr/local/lib/python3.11/site-packages (from wsproto>=0.14->trio-websocket~=0.9->selenium->-r requirements.txt (line 1)) (0.14.0)

  1. try reels.py

command to try it : facebook-reels-downloader$ python3 reels.py aikido https://www.facebook.com/reel/450899210874723 Unfortunately there seems a problem with the function webdriver of the module selenium : output : Traceback (most recent call last): File "reels.py", line 1, in <module> from selenium import webdriver ModuleNotFoundError: No module named 'selenium'

  1. check packages :

facebook-reels-downloader$ pip list | grep sel selenium 4.22.0 facebook-reels-downloader$ pip list | grep yt-dlp yt-dlp 2024.7.1

duongxthanh commented 4 months ago

Are you install required package yet? pip3 install -r requirements.txt

droopy4u commented 4 months ago

Unfortunately yes, like mentioned in my previous writting with the command line and output. That's why I don't understand it.

  1. part installation :

I have installed the packages by command to install the required packages yt-dlp and selenium mentioned requirements.txt :

facebook-reels-downloader$ pip3 install -r requirements.txt

The output of the installation is shown in my first comment : Requirement already satisfied ....

  1. part check packages :
    facebook-reels-downloader $ pip3 list | grep yt-
    yt-dlp             2024.7.1
    facebook-reels-downloader$ pip3 list | grep sel
    selenium           4.22.0
    facebook-reels-downloader$ pip list | grep yt-
    yt-dlp             2024.7.1
    facebook-reels-downloader$ pip list | grep sel
    selenium           4.22.0

So I don't understand the failure about the missing module of selenium : python3 ./reels.py aikido https://www.facebook.com/reel/450899210874723 feedback :


Traceback (most recent call last):
  File "./reels.py", line 1, in <module>
    from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'
binhnguyenbinh commented 4 months ago

PS G:\facebook-reels-downloader-main> python3 reels.py AB https://www.facebook.com/EmpireClubb/reels/

DevTools listening on ws://127.0.0.1:59035/devtools/browser/4df3f6d7-6060-420e-a05f-a300692f14cb Created TensorFlow Lite XNNPACK delegate for CPU. Reached the bottom of the page. Traceback (most recent call last): File "G:\facebook-reels-downloader-main\reels.py", line 52, in subprocess.run(args) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1264.0_x64qbz5n2kfra8p0\Lib\subprocess.py", line 548, in run with Popen(*popenargs, **kwargs) as process: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1264.0_x64qbz5n2kfra8p0\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1264.0_x64__qbz5n2kfra8p0\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] The system cannot find the file specified