carykh / jumpcutter

Automatically edits vidx. Explanation here: https://www.youtube.com/watch?v=DQ8orIurGxw
MIT License
3.07k stars 544 forks source link

I have trouble getting this to work :( #158

Open Dr-McFish opened 4 years ago

Dr-McFish commented 4 years ago

I remember this working for me before, but now it just refuses to work.

I install all the libraries with:

python3 -m pip install -r requirements.txt

and it works except this warning:

 WARNING: The script f2py.exe is installed in 'C:\Users\Me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script pytube.exe is installed in 'C:\Users\Me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts' which is not on PATH.

and when I try to run the program:

python3 jumpcutter.py -h

It gives me this

Traceback (most recent call last):
  File "jumpcutter.py", line 9, in <module>
    from pytube import YouTube
  File "C:\Users\Me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pytube\__init__.py", line 16, in <module>
    from pytube.streams import Stream
  File "C:\Users\Me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pytube\streams.py", line 17, in <module>
    from pytube import extract
  File "C:\Users\Me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pytube\extract.py", line 7, in <module>
    from pytube.compat import quote
ImportError: cannot import name 'quote' from 'pytube.compat' (C:\Users\Me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pytube\compat.py)

Thanks in advance

Lamaun commented 4 years ago

1) Please include where you executed jumpcutter. 2) Which Python version are you using? 3) Maybe you forgot something during install. I still get a working version with https://github.com/lamaun/jumpcutter/#windows 4) You can try too add C:\Users\Me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts to your PYTHONPATH Environment variable: https://docs.python.org/3/using/windows.html#excursus-setting-environment-variables

Dr-McFish commented 4 years ago
  1. I extracted the zip into the downloads folder such that Downloads\jumpcutter-master\jumpcutter.py than I typed in cmd cd C:\Users\Me\Downloads\jumpcutter-master and then tried to run the program with python3 jumpcutter.py -h

  2. I am using python 3.7

  3. I don't think it should matter whether I did something wrong with the installation if it breaks on the first lines of code on the import statements, but I am not sure. I don't think I did miss anything

  4. Ok I did this:

C:\>set PYTHONPATH=%PYTHONPATH%;C:\Users\Me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts
C:\>python

But It still doesn't work and says the same thing

  1. Thank you for your help and patience
Lamaun commented 4 years ago

Did you just type python as the second command or did you write python3 jumpcutte.py -h? python and python3 could be different versions. As you installed the requirements with python3 -m pip install -r requirements.txt they would not be installed for your python which is probably just version 2.7. You would probably get a similar ImportError

The next thing is: I just assumed, that the error tells you to add it to your PYTHONPATH but looking at it again it clearly says PATH variable. Maybe try:

C:\>set PATH=%PATH%;C:\Users\Me\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\Scripts
C:\>python3 jumpcutter.py -h
Dr-McFish commented 4 years ago

Uhm so i got it to work... I just commented ou the line: #from pytube import YouTube

And it does fully work

on an unrelated note, I tried to use this program with a long video, and eventually, it gave me a memory error while it was saying [number] time-altered frames saved. any idea how to maybe split videos into smaller 15min chunks so it can prosses them? Are there any alternatives to this tool that allow for longer videos?

HaujetZhao commented 4 years ago

Uhm so i got it to work... I just commented ou the line: #from pytube import YouTube

And it does fully work

on an unrelated note, I tried to use this program with a long video, and eventually, it gave me a memory error while it was saying [number] time-altered frames saved. any idea how to maybe split videos into smaller 15min chunks so it can prosses them? Are there any alternatives to this tool that allow for longer videos?

Yes!!! I met this error too! even if singly run from pytube import YouTube would also jump error cannot import name 'quote' from 'pytube.compat' !!!

Thanks to your thread, I commented the '#from pytube import YouTube'

HaujetZhao commented 4 years ago

Uhm so i got it to work... I just commented ou the line: #from pytube import YouTube

And it does fully work

on an unrelated note, I tried to use this program with a long video, and eventually, it gave me a memory error while it was saying [number] time-altered frames saved. any idea how to maybe split videos into smaller 15min chunks so it can prosses them? Are there any alternatives to this tool that allow for longer videos?

hahhh, I got the solution! run pip install pytube3 --upgrade I think the pytube is deprecated, only the pytube3 is in development. so the requirement.txt should update the pytube into pytube3

dellplexed commented 4 years ago

I did pip install -r requirements.txt.

kurinoku commented 4 years ago

use pip uninstall pytube then pip install pytube3