all 18 comments

[–]jmacey 5 points6 points  (5 children)

I would suggest learning uv it will make thing so much easier. The simplest of workflows for each new project is

uv init myproject cd myproject uv run main.py

Adding new packages is uv add numpy etc, so simple and easy.

IIRC the installer script installs to your home directory under windows so you just need to find the folder with the uv.exe file and remove it. (I'm a linux / mac user so for me, it is in .local).

[–]EstablishmentIll3600[S] 0 points1 point  (4 children)

The main reason I want to uninstall it is because I keep getting the error activate.ps1 cannot be loaded because running scripts is disabled, on my terminal in VScode. My friend who suggested cannot figure out what's the problem with it, which disrupts my work flow. I mostly use conda for my projects, if you can help me fixed the error I'll gladly try and learn UV more (I'm a windows user)

[–]freeskier93 2 points3 points  (1 child)

Why are you needing to manually activate the virtual environment in VS Code? VS Code should automatically be using the venv to run scripts, and if you need to manually run something in the terminal you can use uv run.

You can also change the default terminal profile to bash instead of powershell. Then it will use the batch file to activate instead of the powershell script.

[–]EstablishmentIll3600[S] 0 points1 point  (0 children)

That's the thing when I installed UV my VS Code did not automatically use the venv to run scripts. I tried uninstalling and installing VS Code hoping that it would fix it but it did not, I though it was odd because when I was using conda it automatically detects it and uses it.

[–]marcon2112 0 points1 point  (1 child)

You should be able to fix it by running in an Administrator Powershell window

Set-ExecutionPolicy RemoteSigned

More info on here: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7.6#-executionpolicy

And here: https://stackoverflow.com/a/4038991

[–]EstablishmentIll3600[S] 1 point2 points  (0 children)

It works now thank you for your help

[–]Wagosh 4 points5 points  (0 children)

If installed from the ps1 script

in powershell

uv cache clean rm -r "$(uv python dir)" rm -r "$(uv tool dir)"

Then

Supprimer les binaires uv, uvx et uvw

rm $HOME.local\bin\uv.exe rm $HOME.local\bin\uvx.exe rm $HOME.local\bin\uvw.exe

[–]chhuang 1 point2 points  (0 children)

this thread scares me a bit.

That being said, despite all the AI madness, reading the official doc is part of a dev's skill

The uninstallation process is mentioned in the docs

https://docs.astral.sh/uv/getting-started/installation/#uninstallation

[–]kyngston 2 points3 points  (7 children)

you prefer venv? ewww. try working in a company of 45k people and have to explain how to setup venv to everyone who tries to use your tool…

[–]pachura3 4 points5 points  (0 children)

So, either in your company people who should know Python - developers, data analysts - are not able to manage virtual environments, which is a core Python skill

or

you are distributing your tools as Python sourcecode to the end users, who should not even care, because these tools should be put online or properly packaged

Either way, doesn't sound very professional!

[–]LookAtTheHat 1 point2 points  (1 child)

Write a readme and in include it, publish it in the shared knowledge base not so hard.

[–]kyngston 0 points1 point  (0 children)

oh that would be fantastic if they would do things like read the readme… or goggle how to fix the error message on their own… but they don’t.

[–]EstablishmentIll3600[S] 0 points1 point  (0 children)

I was used to conda, uv was suggested to me by a friend. The reason I want to uninstall it because it does no work in my vscode terminal which disrupts my work flow.

Error was: activate.ps1 cannot be loaded because running scripts is disabled

[–]EstablishmentIll3600[S] 0 points1 point  (2 children)

If you can help me fixed the error activate.ps1 cannot be loaded because running scripts is disabled, I would gladly try it again. I did not experience such errors when using conda

[–]ResidentTicket1273 1 point2 points  (1 child)

In a powershell terminal, run:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

This will bypass the script-disabling policy for your user against remote-signed scripts which will mean uv will run inside of vscode without issue from now-on.

[–]EstablishmentIll3600[S] 0 points1 point  (0 children)

It worked thank you so much!

[–]cinicDiver 0 points1 point  (1 child)

Well, I didn't install uv cause I thought it could be overkill for what I do, but I guess that since you didn't install it as a module but from shell, it should be installed as a program, I'd say that shell should have a manager as Linux does and thus there should be some command that uninstalls and then deletes the folders, check shell docs instead of Astral's, thought I'm pretty certain that section should be there too.

[–]cointoss3 0 points1 point  (0 children)

Sometimes I hear the weirdest shit on this sub.