Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip-autoremove 0.10.0 no longer runs on Windows #43

Open
marsfan opened this issue Sep 24, 2021 · 18 comments · May be fixed by #44
Open

pip-autoremove 0.10.0 no longer runs on Windows #43

marsfan opened this issue Sep 24, 2021 · 18 comments · May be fixed by #44

Comments

@marsfan
Copy link

marsfan commented Sep 24, 2021

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'
`
@bcrotty
Copy link

bcrotty commented Sep 25, 2021

Same issue here.

@ghost
Copy link

ghost commented Sep 29, 2021

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

@imba-tjd imba-tjd linked a pull request Sep 30, 2021 that will close this issue
@tresni
Copy link
Contributor

tresni commented Oct 3, 2021

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.

@marsfan
Copy link
Author

marsfan commented Oct 6, 2021

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

@imba-tjd
Copy link

imba-tjd commented Oct 21, 2021

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.

@sl1pkn07
Copy link

sl1pkn07 commented Oct 23, 2021

@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

@imba-tjd
Copy link

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

@Dysta
Copy link

Dysta commented Jan 13, 2022

Same issue here

@viliusddd
Copy link

Same here

@xahon
Copy link

xahon commented Jan 28, 2022

same

@matias-fuentes
Copy link

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

@imba-tjd
Copy link

imba-tjd commented Apr 4, 2022

@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.

@aleck31
Copy link

aleck31 commented Apr 26, 2022

Same issue on Windows

@tresni
Copy link
Contributor

tresni commented Apr 26, 2022

This is a known issue, see #44 .

@Atralb
Copy link

Atralb commented Jun 17, 2022

@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.

@tresni
Copy link
Contributor

tresni commented Jun 17, 2022

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.

@bolijesus
Copy link

bolijesus commented Oct 7, 2022

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 👍

@damnms
Copy link

damnms commented Nov 27, 2023

seems like this module is very broken when such basic stuff is not merged. which is really sad, because it seems like that module could solve my problem. @invl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.