pip-autoremove icon indicating copy to clipboard operation
pip-autoremove copied to clipboard

pip-autoremove 0.10.0 no longer runs on Windows

Open marsfan opened this issue 3 years ago • 18 comments

The changes to the package build process now installs pip_autoremove.py to C:\Python3.9\Scripts instead of C:\Python3.9\Lib\site-packages.

C:\Python3.9\Scripts is not on PYTHONPATH, so atttempting to run pip-autoremove results in the following error:

Traceback (most recent call last):
  File "C:\\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\\Python39\Scripts\pip-autoremove.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'pip_autoremove'
`

marsfan avatar Sep 24 '21 17:09 marsfan

Same issue here.

bcrotty avatar Sep 25 '21 21:09 bcrotty

just found that python3-pip-autoremove it works but is not updates since year now but it works

RajatM24 avatar Sep 29 '21 06:09 RajatM24

If you can, please test #44 and report back if that works for you. I'm not seeing any negative effects on Mac OS or Linux, so just a question of whether this works on Windows or not.

tresni avatar Oct 03 '21 18:10 tresni

@tresni #44 does indeed fix the problem when running on Windows.

marsfan avatar Oct 06 '21 16:10 marsfan

Before my pr get merged, if anyone wants to use my fix, run pip install git+https://github.com/imba-tjd/pip-autoremove@ups. Just remember to reinstall the original package after being merged.

imba-tjd avatar Oct 21 '21 00:10 imba-tjd

@imba-tjd not worek for me. seems your command is wrong

fatal: repository 'https://github.com/imba-tjd/pip-autoremove/tree/ups/' not found

EDIT: fixed with pip install --force git+https://github.com/imba-tjd/pip-autoremove@ups

sl1pkn07 avatar Oct 23 '21 22:10 sl1pkn07

Thanks, I didn't know that. I have updated my comment.

imba-tjd avatar Oct 23 '21 23:10 imba-tjd

Same issue here

Dysta avatar Jan 13 '22 16:01 Dysta

Same here

viliusddd avatar Jan 21 '22 07:01 viliusddd

same

xahon avatar Jan 28 '22 14:01 xahon

@imba-tjd Your fix didn't worked for me. It installs and everything but still not running.

matias-fuentes avatar Apr 03 '22 03:04 matias-fuentes

@matias-fuentes I can't help. I just found that --force will try to reinstall pip even though it's the latest version, so that it fails to install due to permission denied. I have updated my comment to remove the flag. But you said it installs, meaning that's not the issue you met.

imba-tjd avatar Apr 04 '22 00:04 imba-tjd

Same issue on Windows

aleck31 avatar Apr 26 '22 01:04 aleck31

This is a known issue, see https://github.com/invl/pip-autoremove/pull/44 .

tresni avatar Apr 26 '22 20:04 tresni

@tresni Yes it is, and it has been shown to you countless times (#32 #43 #44) that the PR you're linking is clearly needed for a lot of the population. So what are you waiting exactly to merge it ?? It's been almost a year.

Atralb avatar Jun 17 '22 20:06 Atralb

I have no power to merge anything. I just try to make sure people know where the fix is. @invl is the only one with access to merge anything.

tresni avatar Jun 17 '22 23:06 tresni

Traceback (most recent call last):
  File "C:\\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\\Python39\Scripts\pip-autoremove.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'pip_autoremove'

PARA WINDOWS 10. Para solucionar el error de pip-autoremove, lo que se tiene que hacer es mover los archivos que se instalan por defecto en la carpeta C:/Users//AppData/Roaming/Python/Python310 , dentro de esa carpeta estan hay dos carpetas más, /Scripts y /site-package.

/Scripts : contiene los archivos .py y/o .exe del modulo o script que se instalan por pip en windows. /site-package. : contiene la informacion de ese paquete que se instalo por pip, es la ruta que utiliza pip list y pip freeze para saber que paquetes estan instalados y que version tiene cada paquete.

Para poder usar el paquete o script pip-autoremove de manera que no de error, se deben mover los archivos a las siguientes rutas o carpetas:

C:/Users//AppData/Roaming/Python/Python310/Scripts/ pip_autoremove.py se debe mover a C:/Program Files/Python310/ Lib

C:/Users//AppData/Roaming/Python/Python310/Scripts/__pycache__/ pip_autoremove.cpython-310.pyc se debe mover a C:/Program Files/Python310/Lib/__pycache__

y el archivo C:/Users//AppData/Roaming/Python/Python310/Scripts/ pip-autoremove.exe se puede dejar en ese directorio, siempre y cuando la ruta C:/Users//AppData/Roaming/Python/Python310/Scripts/ este en el path de las variables de entorno en windows, dejo este video por si no saben configurar las variables de entorno de windows https://www.youtube.com/watch?v=GvCiCFXEivk, si hacen este paso, cierren su cmd o consola y vuelvan a abrirla.

Si no quieren configurar la variable de entorno, simplemente muevan el archivo C:/Users//AppData/Roaming/Python/Python310/Scripts/ pip-autoremove.exe moverlo a C:/Program Files/Python310/ Scripts

luego de ya haber hecho todo esto, pueden ejecutar pip-autoremove en la consola y les debe salir

Usage: pip-autoremove [OPTION]... [NAME]...

`Options:

--version show program's version number and exit

-h, --help show this help message and exit

-l, --list list unused dependencies, but don't uninstall them.

-L, --leaves list leaves (packages which are not used by any others).

-y, --yes don't ask for confirmation of uninstall deletions.

-f, --freeze list leaves (packages which are not used by any others) in

            requirements.txt format`

Espero sirva mi aporte 👍

bolijesus avatar Oct 07 '22 03:10 bolijesus