when anaconda prompt is called it says access is denied - cmd

when i open anaconda prompt or use "conda" in cmd its says access is denied and window prompt
"
this app can't run on your pc to find a version for your pc check with the software publisher"
and right now i also cant open anaconda navigator as well
Noted: I have been using the anaconda for a while with no problem before, however i miss-clicked sign out option instead of shutdown from window10 and it seem that the privacy is changed somehow, so far i have try changing environment variable and manage app execution alias but both of them did not solve the issue. Please share your solution if you experience this before thank you

The solution I found for it is the worst possible: I simply reinstalled Anaconda.
You can also try just getting conda.exe from the compiled source and replace it on Scripts folder instead of reinstalling it.

Related

Uninstalled Anaconda now Powershell is Showing Error Everytime I Open It

I uninstalled Anaconda3 following all the steps of the official documentation, but now whenever I open PowerShell or Terminal I get this prompt-
How do I remove it? It's really annoying.
Have a look at your PowerShell profile and remove that "conda.exe" line.

How to make a clean removal of anaconda without anaconda-clean?

Sorry because i know that this topic has already been explored many times, but i couldn't find any solution to my problem.
I'm on windows 10 (if my company was working with linux i wouldn't have this type of problem --')
To sum up i tried to unsinstall Anaconda (the usual windows way by unstalling the application), to reinstall and make a fresh new installation (i'm naïve i was hopping this would be simple)...
Then when i launched spyder and the anaconda navigator, it told me that the shortcuts was invalid and that i needed to delete it.
Why not after all i just uninstall reinstall, i just needed to create new shortcuts using directly the application of spyder or anaconda that i would find in my computer...
But nothing worked. When i found the application (spyder or anaconda navigator) it didn't work, i wasn't able to launch anything. My anaconda prompt just seems to be a classic windows terminal (commands as conda, pip or jupyter just doesn't exist anymore).
This is the beginning....
Currently i have tried many thing (uninstall reinstall 4 times, delete folders myself etc..) but nothing worked and i'm affraid i totaly broke Anaconda..
Do you have any ideas on how i can get out of this mess ?
PS: of course to make the problem harder, i used a proxy to install package so i used pip for all my libraries and i'm not sure i can install with conda (whatever the conda commands doesn't work now :'( )
Seems that i finally achieve to delete all the concerning file and redo the installation ^^

How to access Anaconda in PowerShell after reinstallation?

Anaconda was installed by Systems Team on my work computer.
For reasons beyond this topic, they installed in Program Files, which I think is non-optimal.
So I ask permission to remove the installation and reinstall it via standard procedures.
When I open Anaconda PowerShell prompt it is still pointing to the Program Files installation which I have removed.
I have also checked the Path environmental variable, and there is nothing looking like Anaconda is still there.
How can I get Anaconda PowerShell prompt to work again?
It should be noted that conda command does work in regular command prompt.
Thanks.
Initialize conda for use with Powershell via
conda init powershell
This command should be run in Anaconda Prompt.
Before following #Peter's solution, I was able to track the problem via a more rustic procedure.
Right click on Start Menu's Anaconda PowerShell Prompt, and select Open File Location.
Right click on the icon's Properties, select Shortcut tab > Target field.
Copy the command to a text editor, and noticed it was still using an old location.
Changing the command to point to the right location did fix the problem.
... but that is only the command from the Start Menu, the rest is done by what was suggested before.
Thanks for the help.

How to solve [WinError 5] Access is denied in anaconda prompt

I have recently reset my laptop and installed Anaconda in it, and I tried to open JupyterLab but it gives me error
Error executing Jupyter command 'lab': [WinError 5] Access is denied
but it works fine when I try to open JUPYTER NOTEBOOK or try to open JUPYTER LAB with Anaconda as administrator.
I reinstalled Anaconda, and still it gives me the same error. Also it gives me the same error when I try to open JUPYTER LAB from Anaconda Navigator. Before resting my laptop it works fine for me, but now it's not. I tried to search my query on the web before asking here, but I did not get my answer.
I want to run JUPYTER LAB with normal Anaconda prompt
Additional details
My Anaconda is installed in C:\ProgramData (by default).
I didn't check the box “add to path” while installing Anaconda.
You can just run it with Python:
python -m jupyterlab
This should work from an Anaconda Prompt or even the command prompt (if it uses the Python in Anaconda). It does not require admin rights.
Workaround:
open anaconda navigator
click on the jupyter lab settings option and then remove it
Now open your anaconda prompt and type the following command: conda install -c conda-forge jupyterlab
now try to open it.
Proper solution:
If you have installed Anaconda for all users then you will face this issue (thanks to Alok Rajasukumaran, who pointed out this). The best way to solve this problem would be to reinstall this for only the current user.
But if you have a requirement to install for all users, then you can follow these steps:
run the terminal as an administrator
type jupyter lab
Optional (Automating launching jupyter lab with shortcut)
If you want to automate these steps, then you can create a batch file and assign a keyboard shortcut to it. Steps are as follows:
open notepad and write "jupyter lab" and save it as a .bat file
right-click on that file and click on create shortcut.
now open the properties of created shortcut file and in the "shortcut-key" section type any combination of keys you want to set
shortcut.
click on "Advanced" and select "Run as administrator"
Now you can initiate jupyter lab directly by typing your shortcut key and giving "yes" permission to the prompt.
Try to execute as an admin. Problem solved.
This solution is unsafe. When you execute a program with Admin this program has full permissions over the system.
The good solution is to create a new environment with your current system user (not root/admin). Activate this new environment and it would works
Usually, you don't have error in opening jupyter notebook command.
I usually type the jupyter notebook in the path bar in the explorer to open the notebook from that path directly — but as we are having an error in jupyter lab, I was only able to open jupyter notebook from there.
The solution for that is:
Just type jupyter notebook as usual in the command prompt or the path bar in explorer.
As soon as the browser opens automatically, change the URL from:
http://localhost:8888/tree to → http://localhost:8888/lab
Yes, just a one word change. tree → lab and...
Whoo! The jupyter lab is open right there you want it to be!
This is a problem that I see happening for Anaconda 3 installs for all users on Windows. Default (for single user) install seems fine. The permissions are somehow messed up during install. The solution I found is: explorer > right click anaconda3 folder > properties > security > advanced > change permissions > check "replace all child permission entries..." > OK.
This will take a while. After that uninstalling and reinstalling Jupyter Lab worked well.
The problem I had is that it installed the application in users/<your username>/anaconda3/.
To solve this I simply manually moved the folder with its contents to c:/program files/.
Avoid running as Admin due to security concerns. The fastest way is to create a virtual environment and install it there. This is what I did and it did not require any reinstallation of Anaconda or running it as Admin.
in anaconda prompt:
conda create -n myenv python=3.9
conda activate myenv
conda install -c conda-forge jupyterlab
jupyter lab
the last line will launch the jupyter lab.
I want to emphasize what was written only as a comment, because it is easier to find it as an answer than to browse all comments:
If you are using Windows and installed it for all users, you will get this error.
The easiest way is to reinstall Anaconda only for you.
Note: You may uninstall your previous (unsuccessful) installation (for all users) before reinstalling it for only one user (you). But it is possible to do it later, too.
What I did is to create a new environment in Anaconda Navigator. I had the default environment which was root, so I could launch applications only as root.
In the Anaconda Navigator Home screen click on Environments -> Create. Here is the guide to create a new environment https://docs.anaconda.com/anaconda/navigator/tutorials/manage-environments/

Anaconda Navigator - Multiple Errors Encountered

I recently broke my installation of Anaconda Navigator by using:
conda update --all -y
Apparently this is not uncommon, and it was a good excuse to reinstall Anaconda and start a new environment from scratch.
However, my new installation gives the following error, when trying to install any libraries:
I have tried:
Windows uninstall of Anaconda, followed by reboot, then reinstall
uninstall/reboot/install as admin
uninstall/reboot/manually delete various remaining folders in the User directory/reboot/reinstall
etc etc
All these methods produce this error, when trying to install libraries.
install libraries using Anaconda console works fine
there aren't any problems in Windows' PATH
conda is up to date
What's going on!?
If you install Anaconda as admin, then you need to launch it as admin every time you run updates.
You can enable this behaviour by default by navigating to the Anaconda launch shortcut, right-click > Properties, go to Shortcut tab, click Advanced, and tick 'Always launch as administrator'.
Have you tried to create a new environment? I had the same message in another situation and that's what worked for me.
maybe you can try to download package and install it by yourself .
here is a python package url https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

Resources