YouTube video viewer program - python

I am trying to use the Youtube viewer program on someone's YouTube videos. The source code of this program can be found on the GitHub page.
There is a problem in the import statements, though.
In the YouTube viewer -> youtubeviewer -> download_driver.py file, so this page, there is an import statement.
import undetected_chromedriver._compat as uc
At first when I tried to run this program, the following error pops up:
ModuleNotFoundError: No module named 'undetected_chromedriver'
I eventually installed it using the python3 -m pip install undetected_chromedriver command. Everything ran smoothly until the statement above. The command prompt popped up the following error message.
Traceback (most recent call last):
File "C:\Users\14725\YouTube-Viewer\youtube_viewer.py", line 42, in <module>
from youtubeviewer.download_driver import *
File "C:\Users\14725\YouTube-Viewer\youtubeviewer\download_driver.py", line 29, in <module>
import undetected_chromedriver._compat as uc
ModuleNotFoundError: No module named 'undetected_chromedriver._compat'
I checked again if I had installed the module by using the python3 -m pip install undetected_chromedriver command. The following messages popped up:
Requirement already satisfied: undetected_chromedriver in c:\users\14725\appdata\roaming\python\python39\site-packages (3.4)
Requirement already satisfied: requests in c:\users\14725\appdata\roaming\python\python39\site-packages (from undetected_chromedriver) (2.28.0)
Requirement already satisfied: selenium>=4.0.0 in c:\users\14725\appdata\roaming\python\python39\site-packages (from undetected_chromedriver) (4.8.0)
Requirement already satisfied: websockets in c:\users\14725\appdata\roaming\python\python39\site-packages (from undetected_chromedriver) (10.4)
Requirement already satisfied: certifi>=2021.10.8 in c:\users\14725\appdata\roaming\python\python39\site-packages (from selenium>=4.0.0->undetected_chromedriver) (2022.5.18.1)
Requirement already satisfied: trio~=0.17 in c:\users\14725\appdata\roaming\python\python39\site-packages (from selenium>=4.0.0->undetected_chromedriver) (0.22.0)
Requirement already satisfied: urllib3[socks]~=1.26 in c:\users\14725\appdata\roaming\python\python39\site-packages (from selenium>=4.0.0->undetected_chromedriver) (1.26.9)
Requirement already satisfied: trio-websocket~=0.9 in c:\users\14725\appdata\roaming\python\python39\site-packages (from selenium>=4.0.0->undetected_chromedriver) (0.9.2)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\14725\appdata\roaming\python\python39\site-packages (from requests->undetected_chromedriver) (2.0.12)
Requirement already satisfied: idna<4,>=2.5 in c:\users\14725\appdata\roaming\python\python39\site-packages (from requests->undetected_chromedriver) (3.3)
Requirement already satisfied: cffi>=1.14 in c:\users\14725\appdata\roaming\python\python39\site-packages (from trio~=0.17->selenium>=4.0.0->undetected_chromedriver) (1.15.0)
Requirement already satisfied: sniffio in c:\users\14725\appdata\roaming\python\python39\site-packages (from trio~=0.17->selenium>=4.0.0->undetected_chromedriver) (1.3.0)
Requirement already satisfied: sortedcontainers in c:\users\14725\appdata\roaming\python\python39\site-packages (from trio~=0.17->selenium>=4.0.0->undetected_chromedriver) (2.4.0)
Requirement already satisfied: async-generator>=1.9 in c:\users\14725\appdata\roaming\python\python39\site-packages (from trio~=0.17->selenium>=4.0.0->undetected_chromedriver) (1.10)
Requirement already satisfied: outcome in c:\users\14725\appdata\roaming\python\python39\site-packages (from trio~=0.17->selenium>=4.0.0->undetected_chromedriver) (1.2.0)
Requirement already satisfied: attrs>=19.2.0 in c:\users\14725\appdata\roaming\python\python39\site-packages (from trio~=0.17->selenium>=4.0.0->undetected_chromedriver) (21.4.0)
Requirement already satisfied: exceptiongroup>=1.0.0rc9 in c:\users\14725\appdata\roaming\python\python39\site-packages (from trio~=0.17->selenium>=4.0.0->undetected_chromedriver) (1.1.0)
Requirement already satisfied: wsproto>=0.14 in c:\users\14725\appdata\roaming\python\python39\site-packages (from trio-websocket~=0.9->selenium>=4.0.0->undetected_chromedriver) (1.2.0)
Requirement already satisfied: PySocks!=1.5.7,<2.0,>=1.5.6 in c:\users\14725\appdata\roaming\python\python39\site-packages (from urllib3[socks]~=1.26->selenium>=4.0.0->undetected_chromedriver) (1.7.1)
Requirement already satisfied: pycparser in c:\users\14725\appdata\roaming\python\python39\site-packages (from cffi>=1.14->trio~=0.17->selenium>=4.0.0->undetected_chromedriver) (2.21)
Requirement already satisfied: h11<1,>=0.9.0 in c:\users\14725\appdata\roaming\python\python39\site-packages (from wsproto>=0.14->trio-websocket~=0.9->selenium>=4.0.0->undetected_chromedriver) (0.14.0)
Which I think these have indicated that I have the module installed. What should I do to run this program? Have I missed something?

There was an important update of undetected_chromedriver recently. I recommend you to install the latest known stable version with:
pip install undetected-chromedriver==3.2.1

Related

when using train tab in stable diffusion webui, it says can't find Deepdanbooru

When i was running stable-diffusion-webui's preprocess images feature on MacBookpro M1 + macos12.6 + python3.10, it says:
File "user/Desktop/stable-diffusion-webui/modules/deepbooru.py", line 88, in get_deepbooru_tags_model
import deepdanbooru as dd
ModuleNotFoundError: No module named 'deepdanbooru'
somebody have any ideas how to slove this problem?
i also tried
git and reinstall through pip:
tensorflow-macos
tensorflow-io
deepdanbooru
but they all doesn't works
and im already install:
tensorflow-macos 2.1.0, tensorflow-io 0.27.0
when i run pip install deepdanbooru
result is:
Requirement already satisfied: deepdanbooru in /opt/homebrew/lib/python3.10/site-packages/deepdanbooru-1.0.0-py3.10.egg (1.0.0)
Requirement already satisfied: Click>=7.0 in /opt/homebrew/lib/python3.10/site-packages (from deepdanbooru) (8.1.3)
Requirement already satisfied: numpy>=1.16.2 in /opt/homebrew/lib/python3.10/site-packages (from deepdanbooru) (1.23.5)
Requirement already satisfied: scikit-image>=0.15.0 in /opt/homebrew/lib/python3.10/site-packages (from deepdanbooru) (0.19.3)
Requirement already satisfied: requests>=2.22.0 in /opt/homebrew/lib/python3.10/site-packages (from deepdanbooru) (2.28.1)
Requirement already satisfied: six>=1.13.0 in /opt/homebrew/lib/python3.10/site-packages (from deepdanbooru) (1.16.0)
Requirement already satisfied: idna<4,>=2.5 in /opt/homebrew/lib/python3.10/site-packages (from requests>=2.22.0->deepdanbooru) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in /opt/homebrew/lib/python3.10/site-packages (from requests>=2.22.0->deepdanbooru) (2022.9.24)
Requirement already satisfied: charset-normalizer<3,>=2 in /opt/homebrew/lib/python3.10/site-packages (from requests>=2.22.0->deepdanbooru) (2.1.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /opt/homebrew/lib/python3.10/site-packages (from requests>=2.22.0->deepdanbooru) (1.26.12)
Requirement already satisfied: tifffile>=2019.7.26 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (2022.10.10)
Requirement already satisfied: pillow!=7.1.0,!=7.1.1,!=8.3.0,>=6.1.0 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (9.3.0)
Requirement already satisfied: scipy>=1.4.1 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (1.9.3)
Requirement already satisfied: packaging>=20.0 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (21.3)
Requirement already satisfied: imageio>=2.4.1 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (2.22.4)
Requirement already satisfied: networkx>=2.2 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (2.8.8)
Requirement already satisfied: PyWavelets>=1.1.1 in /opt/homebrew/lib/python3.10/site-packages (from scikit-image>=0.15.0->deepdanbooru) (1.4.1)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /opt/homebrew/lib/python3.10/site-packages (from packaging>=20.0->scikit-image>=0.15.0->deepdanbooru) (3.0.9)```

'No module named 'webdriver_manager'' after reinstalling, checking library correctness

When I want to
from webdriver_manager.chrome import ChromeDriverManager
I get ModuleNotFoundError. I have uninstalled and installed again using pip3, and chekced the previous related questions here about the same matter, but still can't figure it out. Below are the installation details.
C:\Users\eywy0>pip3 install webdriver_manager
Requirement already satisfied: webdriver_manager in c:\users\eywy0\anaconda3\lib\site-packages (3.7.1)
Requirement already satisfied: requests in c:\users\eywy0\anaconda3\lib\site-packages (from webdriver_manager) (2.27.1)
Requirement already satisfied: python-dotenv in c:\users\eywy0\anaconda3\lib\site-packages (from webdriver_manager) (0.20.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\eywy0\anaconda3\lib\site-packages (from requests->webdriver_manager) (1.26.9)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\users\eywy0\anaconda3\lib\site-packages (from requests->webdriver_manager) (2.0.4)
Requirement already satisfied: idna<4,>=2.5 in c:\users\eywy0\anaconda3\lib\site-packages (from requests->webdriver_manager) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\eywy0\anaconda3\lib\site-packages (from requests->webdriver_manager) (2021.10.8)
Any clue on what might have gone wrong? Thanks for any help!!

EasyOCR Module Not Found Error Despite Successful Install

I'm trying to run a python file that utilizes easyocr but despite a successful install, I can't get it to recognize that I have easyocr installed. Does anyone know why that is?
Please see below for the install and response in Anaconda:
(base) C:\Users\[username]\Desktop >pip install easyocr
Collecting easyocr
Using cached easyocr-1.4.1-py3-none-any.whl (63.6 MB)
Requirement already satisfied: Pillow<8.3.0 in c:\users\[username]\anaconda3\lib\site-packages (from easyocr) (8.2.0)
Requirement already satisfied: numpy in c:\users\[username]\anaconda3\lib\site-packages (from easyocr) (1.19.2)
Requirement already satisfied: scipy in c:\users\[username]\anaconda3\lib\site-packages (from easyocr) (1.6.2)
Requirement already satisfied: opencv-python-headless in c:\users\[username]\anaconda3\lib\site-packages (from easyocr) (4.5.1.48)
Requirement already satisfied: python-bidi in c:\users\[username]\anaconda3\lib\site-packages (from easyocr) (0.4.2)
Requirement already satisfied: torch in c:\users\[username]\anaconda3\lib\site-packages (from easyocr) (1.8.1)
Requirement already satisfied: torchvision>=0.5 in c:\users\[username]\anaconda3\lib\site-packages (from easyocr) (0.9.1)
Requirement already satisfied: scikit-image in c:\users\[username]\anaconda3\lib\site-packages (from easyocr) (0.18.1)
Requirement already satisfied: PyYAML in c:\users\[username]\anaconda3\lib\site-packages (from easyocr) (5.4.1)
Requirement already satisfied: typing-extensions in c:\users\[username]\anaconda3\lib\site-packages (from torch->easyocr) (3.7.4.3)
Requirement already satisfied: six in c:\users\[username]\anaconda3\lib\site-packages (from python-bidi->easyocr) (1.15.0)
Requirement already satisfied: matplotlib!=3.0.0,>=2.0.0 in c:\users\[username]\anaconda3\lib\site-packages (from scikit-image->easyocr) (3.4.1)
Requirement already satisfied: networkx>=2.0 in c:\users\[username]\anaconda3\lib\site-packages (from scikit-image->easyocr) (2.5.1)
Requirement already satisfied: imageio>=2.3.0 in c:\users\[username]\anaconda3\lib\site-packages (from scikit-image->easyocr) (2.9.0)
Requirement already satisfied: tifffile>=2019.7.26 in c:\users\[username]\anaconda3\lib\site-packages (from scikit-image->easyocr) (2021.4.8)
Requirement already satisfied: PyWavelets>=1.1.1 in c:\users\[username]\anaconda3\lib\site-packages (from scikit-image->easyocr) (1.1.1)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\[username]\anaconda3\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image->easyocr) (1.3.1)
Requirement already satisfied: pyparsing>=2.2.1 in c:\users\[username]\anaconda3\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image->easyocr) (2.4.7)
Requirement already satisfied: python-dateutil>=2.7 in c:\users\[username]\anaconda3\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image->easyocr) (2.8.1)
Requirement already satisfied: cycler>=0.10 in c:\users\[username]\anaconda3\lib\site-packages (from matplotlib!=3.0.0,>=2.0.0->scikit-image->easyocr) (0.10.0)
Requirement already satisfied: decorator<5,>=4.3 in c:\users\[username]\anaconda3\lib\site-packages (from networkx>=2.0->scikit-image->easyocr) (4.4.2)
Installing collected packages: easyocr
Successfully installed easyocr-1.4.1
(base) C:\Users\[username]\Desktop\test.py
Traceback (most recent call last):
File "C:\Users\[username]\Desktop\test.py", line 9, in <module>
from ocr import OCR
File "C:\Users\[username]\Desktop\ ocr.py", line 3, in <module>
import easyocr
ModuleNotFoundError: No module named 'easyocr'

Issue of installing tensorflow 1.15 with python 3.7.7

I am trying to install tensorflow 1.15, and it's installed well. When I run again pip install tensorflow==1.15 it shows me the below screen:
C:\Users\Fatima>pip install tensorflow==1.15
Requirement already satisfied: tensorflow==1.15 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (1.15.0)
Requirement already satisfied: tensorflow-estimator==1.15.1 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (1.15.1)
Requirement already satisfied: keras-applications>=1.0.8 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (1.0.8)
Requirement already satisfied: grpcio>=1.8.6 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (1.37.1)
Requirement already satisfied: termcolor>=1.1.0 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (1.1.0)
Requirement already satisfied: six>=1.10.0 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (1.15.0)
Requirement already satisfied: keras-preprocessing>=1.0.5 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (1.1.2)
Requirement already satisfied: gast==0.2.2 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (0.2.2)
Requirement already satisfied: absl-py>=0.7.0 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (0.12.0)
Requirement already satisfied: opt-einsum>=2.3.2 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (3.3.0)
Requirement already satisfied: wrapt>=1.11.1 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (1.12.1)
Requirement already satisfied: numpy<2.0,>=1.16.0 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (1.20.2)
Requirement already satisfied: protobuf>=3.6.1 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (3.15.8)
Requirement already satisfied: astor>=0.6.0 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (0.8.1)
Requirement already satisfied: wheel>=0.26 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (0.36.2)
Requirement already satisfied: tensorboard<1.16.0,>=1.15.0 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (1.15.0)
Requirement already satisfied: google-pasta>=0.1.6 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorflow==1.15) (0.2.0)
Requirement already satisfied: h5py in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from keras-applications>=1.0.8->tensorflow==1.15) (3.2.1)
Requirement already satisfied: markdown>=2.6.8 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15) (3.3.4)
Requirement already satisfied: setuptools>=41.0.0 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15) (41.2.0)
Requirement already satisfied: werkzeug>=0.11.15 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from tensorboard<1.16.0,>=1.15.0->tensorflow==1.15) (1.0.1)
Requirement already satisfied: importlib-metadata in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15) (4.0.1)
Requirement already satisfied: cached-property in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from h5py->keras-applications>=1.0.8->tensorflow==1.15) (1.5.2)
Requirement already satisfied: typing-extensions>=3.6.4 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from importlib-metadata->markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15) (3.10.0.0)
Requirement already satisfied: zipp>=0.5 in c:\users\Fatima\appdata\local\programs\python\python37\lib\site-packages (from importlib-metadata->markdown>=2.6.8->tensorboard<1.16.0,>=1.15.0->tensorflow==1.15) (3.4.1)
That means that tensorflow is installed, right? The python I am using is V3.7.7
I use Pycharm to run the following code as test:
import tensorflow as tf
print(tf.__version__)
It gives me an error as follows:
Traceback (most recent call last):
File "C:/Python394/for_trials.py", line 1, in <module>
import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'
It's like it couldn't identify the tensorflow, or the python is not compatible with Tf1. However, following the guide, that python 3.7 and older are compatible with Tf1.
Could you please help me in solving that issue to install Tf1 ?
thank you
The problem is that tensorflow is well installed in your machine but in which environment? for pycharm to see tensorflow, tensorflow must be installed in the same environment that pycharm uses to execute code. But if for example your pycharm is configured to execute codes in a virtual environment and tensorflow is installed in anaconda, there is has no way it works. So the simple solution that you can do is to change the environment of pycham to the environment where tensorflow is installed
tu change l’interpréteur comme ceci
tu change l’interpréteur comme ceci
tu change l’interpréteur comme ceci

twine showing "No such file or directory" error

I'm running a Ubuntu 18.04 system, recently installed a new ssd and mapped $HOME onto the ssd then moved the existing files onto it. Somehow, in that process I've mucked up my PYTHONPATH, I believe.
If I run twine upload dist/* I get the following error:
bash: /home/henry/.local/bin/twine: No such file or directory
If I run pip install twine, I get the following output:
Requirement already satisfied: twine in /usr/local/lib/python2.7/dist-packages (1.12.1)
Requirement already satisfied: setuptools>=0.7.0 in /home/henry/.local/lib/python2.7/site-packages (from twine) (39.1.0)
Requirement already satisfied: pkginfo>=1.4.2 in /home/henry/.local/lib/python2.7/site-packages (from twine) (1.4.2)
Requirement already satisfied: readme-renderer>=21.0 in /usr/local/lib/python2.7/dist-packages (from twine) (24.0)
Requirement already satisfied: requests!=2.15,!=2.16,>=2.5.0 in /home/henry/.local/lib/python2.7/site-packages (from twine) (2.18.4)
Requirement already satisfied: tqdm>=4.14 in /home/henry/.local/lib/python2.7/site-packages (from twine) (4.23.3)
Requirement already satisfied: requests-toolbelt>=0.8.0 in /home/henry/.local/lib/python2.7/site-packages (from twine) (0.8.0)
Requirement already satisfied: Pygments in /home/henry/.local/lib/python2.7/site-packages (from readme-renderer>=21.0->twine) (2.2.0)
Requirement already satisfied: six in /home/henry/.local/lib/python2.7/site-packages (from readme-renderer>=21.0->twine) (1.11.0)
Requirement already satisfied: bleach>=2.1.0 in /usr/local/lib/python2.7/dist-packages (from readme-renderer>=21.0->twine) (3.0.2)
Requirement already satisfied: docutils>=0.13.1 in /home/henry/.local/lib/python2.7/site-packages (from readme-renderer>=21.0->twine) (0.14)
Requirement already satisfied: idna<2.7,>=2.5 in /home/henry/.local/lib/python2.7/site-packages (from requests!=2.15,!=2.16,>=2.5.0->twine) (2.6)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /home/henry/.local/lib/python2.7/site-packages (from requests!=2.15,!=2.16,>=2.5.0->twine) (1.22)
Requirement already satisfied: certifi>=2017.4.17 in /home/henry/.local/lib/python2.7/site-packages (from requests!=2.15,!=2.16,>=2.5.0->twine) (2018.1.18)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /home/henry/.local/lib/python2.7/site-packages (from requests!=2.15,!=2.16,>=2.5.0->twine) (3.0.4)
Requirement already satisfied: webencodings in /usr/lib/python2.7/dist-packages (from bleach>=2.1.0->readme-renderer>=21.0->twine) (0.5)
echo "PYTHONPATH=$PYTHONPATH" gives me PYTHONPATH=
What do I do to correct?
use
python -m twine upload dist/*

Categories