YouTube-Viewer icon indicating copy to clipboard operation
YouTube-Viewer copied to clipboard

Undetected chromedriver

Open Mahmoud-ctrl opened this issue 1 year ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

I'm submitting a ...

  • [X] bug report
  • [ ] feature request
  • [ ] support request --> Contact me over mail for support https://github.com/MShawon

Description

Traceback (most recent call last):
  File "c:\Users\www\Downloads\YouTube-Viewer\youtubeviewer\download_driver.py", line 29, in <module>
    import undetected_chromedriver._compat as uc
ModuleNotFoundError: No module named 'undetected_chromedriver._compat'

I tried pip install undetected_chromedriver and still getting the same error

Environment

- OS : Windows 10
- Python : 3.11.2
- Script version : 111.0.5563.147

config.json

.

Mahmoud-ctrl avatar Apr 13 '23 00:04 Mahmoud-ctrl

pip install -r requirements.txt

MShawon avatar Apr 13 '23 01:04 MShawon

Sorry, I forgot to mention that I tried that too and got this error:

PS C:\Users\www\Downloads\YouTube-Viewer> pip install -r requirements.txt
Requirement already satisfied: async-generator==1.10 in c:\users\www\appdata\local\programs\python\python311\lib\site-packages (from -r requirements.txt (line 1)) (1.10)
Collecting attrs==21.4.0
  Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting beautifulsoup4==4.11.1
  Using cached beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
Requirement already satisfied: bs4==0.0.1 in c:\users\www\appdata\local\programs\python\python311\lib\site-packages (from -r requirements.txt (line 4)) (0.0.1)
Collecting certifi==2021.10.8
  Using cached certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
Collecting cffi==1.15.0
  Using cached cffi-1.15.0.tar.gz (484 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\www\AppData\Local\Temp\pip-install-ohpfcvns\cffi_b70ede5570a745a1aa6118d3011bfcab\setup.py", line 126, in <module>
          if sys.platform == "win32" and uses_msvc():
                                         ^^^^^^^^^^^
        File "C:\Users\www\AppData\Local\Temp\pip-install-ohpfcvns\cffi_b70ede5570a745a1aa6118d3011bfcab\setup.py", line 105, in uses_msvc
          return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\www\AppData\Local\Programs\Python\Python311\Lib\distutils\command\config.py", line 225, in try_compile
          self._compile(body, headers, include_dirs, lang)
        File "C:\Users\www\AppData\Local\Programs\Python\Python311\Lib\distutils\command\config.py", line 132, in _compile
          self.compiler.compile([src], include_dirs=include_dirs)
        File "C:\Users\www\AppData\Local\Programs\Python\Python311\Lib\distutils\_msvccompiler.py", line 323, in compile
          self.initialize()
        File "C:\Users\www\AppData\Local\Programs\Python\Python311\Lib\distutils\_msvccompiler.py", line 220, in initialize
          vc_env = _get_vc_env(plat_spec)
                   ^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\www\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\msvc.py", line 316, in msvc14_get_vc_env
          return _msvc14_get_vc_env(plat_spec)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\www\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\msvc.py", line 270, in _msvc14_get_vc_env
          raise distutils.errors.DistutilsPlatformError(
      distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/        
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

pip install -r requirements.txt

Mahmoud-ctrl avatar Apr 13 '23 14:04 Mahmoud-ctrl

@Mahmoud-ctrl Notice that you have the following error: "distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/" You should install this dependency: Microsoft Visual C++ 14.0 or greater from this https://visualstudio.microsoft.com/visual-cpp-build-tools/

NicoLiendro14 avatar Apr 14 '23 03:04 NicoLiendro14