gallery-dl icon indicating copy to clipboard operation
gallery-dl copied to clipboard

i can use py -3 -m gallery_dl "link" but i can't use gallery-dl Link command, python seems already in path

Open www3443 opened this issue 2 years ago • 6 comments

it seems i have placed python in PATH properly image

i use windows 8 & python37 (python 3.7.7) . when i typed in gallery-dl link, it'll yield " gallery-dl is not recognized as an internal or external command " image

though i can use gallery-dl by typing this "py -3 -m gallery_dl link" instead. But i wonder why the gallery-dl is not recognized? is it because i'm using windows so i have to use py -3 -m gallery_dl to make it work?

do i need upgrade gallery-dl or something? i just installed python & gallery-dl (through cmd) today

here are the steps i have done

python -m pip install requests image

py -3 -m pip install -U gallery-dl image

Created a new folder "gallery-dl" in %appdata% . then Created a file named "config.json" copy & paste everything from https://github.com/mikf/gallery-dl/blob/master/docs/gallery-dl.conf into the config.json

what did i do wrong? any help is greatly appreciated. Thank you

www3443 avatar Jul 03 '22 17:07 www3443

Are %LOCALAPPDATA%\programs\python\python37\scripts\ and/or %LOCALAPPDATA%\programs\python\python37\lib\site-packages\ in your %PATH%?

Some of the folders are capitalized for me on my Windows 10 machine: %LOCALAPPDATA%\Programs\Python\Python310\Scripts\.

bradenhilton avatar Jul 03 '22 20:07 bradenhilton

Are %LOCALAPPDATA%\programs\python\python37\scripts\ and/or %LOCALAPPDATA%\programs\python\python37\lib\site-packages\ in your %PATH%?

Some of the folders are capitalized for me on my Windows 10 machine: %LOCALAPPDATA%\Programs\Python\Python310\Scripts\.

*i was adding the PATH manually because i didn't know i have to check on install path when installing python (i left the installation as default)

my each pyhton folder name is capitalized & i copy pasted directly from the folder address how do i know python is already in PATH properly? I've added them through edit env variable

my first user variable is this C:\Users\myname\AppData\Local\Programs\Python\Python37\ & it'll yield gallery-dl is not found but when i changed it to this C:\Users\myname\AppData\Local\Programs\Python\Python37\Scripts it'll yield Access is denied image

image

image

C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\EgisTec MyWinLocker\x64;C:\Program Files (x86)\EgisTec MyWinLocker;C:\Program Files\dotnet;%PATH%

www3443 avatar Jul 04 '22 09:07 www3443

Does the Scripts folder actually exist for you? If so, is gallery-dl.exe in it?

In my user %PATH%, I have the following Python related paths:

C:\Users\MyUser\AppData\Local\Programs\Python\Python310\Scripts\
C:\Users\MyUser\AppData\Local\Programs\Python\Python310\

Here is where gallery-dl in cmd.exe:

C:\Users\MyUser>where gallery-dl
C:\Users\MyUser\AppData\Local\Programs\Python\Python310\Scripts\gallery-dl.exe

Other things to try:

  • Add the trailing backslash to the paths: ...\Python37\Scripts\
  • Put the ...\Python37\Scripts\ path before the ...\Python37\ path

bradenhilton avatar Jul 04 '22 09:07 bradenhilton

@bradenhilton yes, there's gallery-dl.exe in my python path image image

here's how my user var looks like now : C:\Users\myname\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\myname\AppData\Local\Programs\Python\Python37\ and access is still denied I wonder is it something caused by administrator / privilege thing? I've tried to run command prompt as admin & it's still the same

i tried to type gallery-dl instead of gallery_dl and it says "gallery-dl is a package and cannot be directly executed" image

www3443 avatar Jul 08 '22 09:07 www3443

If you view the properties for gallery-dl.exe, does anything look off? Does the account you're using have permission to read and execute the file?

Have you tried to uninstall and reinstall gallery-dl? You could also try uninstalling it, upgrading pip, then reinstalling.

Perhaps try installing with --user also, something like: py -3 -m pip install gallery-dl --user

bradenhilton avatar Jul 08 '22 15:07 bradenhilton

Yeah, from what I can tell, the PATH and all looks correct here, seems like some security setting is interfering here? Just to be sure, what happens when you launch your gallery-d.exe (in \Scripts) by its full path from another location?

Hrxn avatar Jul 10 '22 10:07 Hrxn

hello, thank you all for the help. I reinstalled python on new device & with its default setting (the PATH installation is checked). Now it works fine

*the previous problem might be caused by something in registry or admin/security permission because the path was added manually but it's faster to fix it with reinstalling the python

www3443 avatar Nov 07 '22 08:11 www3443