I've installed Anaconda for data science onto my computer (http://anaconda.com/) for data science through Python.
as I've gone through the workflows for the course, i encountered issues setting up a virtual environment so I skipped this and used the default environment.
Because of the size of the package, I tried unistalling this using windows Add/Remove programs but now my command prompt is no longer working.
I tried recovering it using powershell but powershell opened with the prompt:
& : The term 'C:\Alan\Python\Anaconda3\Scripts\conda.exe' is not recognized as the name of a cmdlet, \function, script
\file, or operable program. Check the spelling of the name, or if a path was included, verify that the \path is correct
\and try again.
\At C:\Users\Alan Curley\Documents\WindowsPowerShell\profile.ps1:4 char:4
(& "C:\Alan\Python\Anaconda3\Scripts\conda.exe" "shell.powershell" "h ...
+ CategoryInfo : ObjectNotFound: (C:\Alan\Python...ripts\conda.exe:String) [], \CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
indicating that the removal of anaconda and its environments failed and left some stuff behind.
I tried following the link at:
Uninstall Anaconda Completely
to re-install anaconda but because my command prompt wont start it wont run anaconda or conda to install "clean anaconda".
Now I'm down any programs that rely on my command prompt to work and I've no idea where to start - any help?
I found the issue with my command prompt.
After some additional digging into the command prompt and issues with the command prompt, I came across the link:
https://answers.microsoft.com/en-us/windows/forum/windows_10-performance-winpc/command-prompt-in-windows-10-flashes-but-wont-stay/e539c3d2-8b1d-433f-82aa-db3944dae0de
using this, I tried calling the command prompt cmd.exe /d to exclude any autorun operations (Further research:
https://sourcedaddy.com/windows-7/using-autorun-execute-commands-when-command-prompt-starts.html#:~:text=To%20specify%20an%20AutoRun%20value,it%20at%20the%20command%20prompt.
)
and my command prompt worked ok again but not if I called up the /d.
I searched the autorun in the registry and there was a part entry:
"if exist "
I removed the autorun entry from the registry registry completely and i was then able to re-install and de-install anaconda again.
Hopefully it's gone for good this time.
Related
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.
I downloaded Anaconda for a class assignment.
The assignment says to type "condas" in Window's Command Prompt to test if Anaconda has successfully installed , but when I do, the command prompt gives the message:
'condas' is not recognized as an internal or external command, operable program or batch file.
I've tried the same thing with "conda" and gotten the same result.
As far as I can tell, I need Anaconda to create Jupyter notebooks, which I can do using the Anaconda Prompt that comes included with Anaconda.
But why is my command prompt not recognizing condas?
Thanks in advance.
By default, Anaconda on Windows does not install itself in a way that makes it accessible from Command Prompt on windows. Instead it creates a special command line application called Anaconda Prompt.
Search for and start Anaconda Prompt from the start menu and use that instead of regular command prompt.
You need to add AnacondaX and AnacondaX\Script to path. You can do that in CMD. E.g. If I have Anaconda3 installed on C:\Users\USERNAME\AppData\Local\Continuum\Anaconda3, you can set path with this command
SETX PATH “%USERPROFILE%\AppData\Local\Continuum\Anaconda3; %USERPROFILE%\AppData\Local\Continuum\Anaconda3\Scripts”
If you close CMD and reopen it, all should work.
I went to the Chocolatey website and copied the text for installing it and pasted into the administrator cmd.exe (using Windows 7). When I run the command I get:
'powershell' is not recognized as an internal or external command, operable program or batch file.
This GitHub article with Chocolatey installation instructions says:
This really is the easiest method because it requires no configuration of PowerShell prior to executing it.
It turns out that #balint was right about the path being incorrect. The path variable at some point had gotten replaced instead of appended to. I was able to install Chocolatey successfully after appending all the paths that had been erased previously!
you have some faulty PowerShell installation, or it is missing from the Windows PATH variable. Run in an administrator cmd:
cmd> set PATH=%PATH%;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\
I have been trying to resolve this issue for the whole day.
When I run node -v or npm install in cmd prompt, it works absolutely fine. But when I run the same commands in Powershell, it gives the following error:s
PS C:\Users\Anubhav.Trivedi> node -v
The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelli
ng of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:5
+ node <<<< -v
+ CategoryInfo : ObjectNotFound: (node:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I tried uninstalling node js and reinstalling it. Added node js path C:\Program Files (x86)\nodejs\ to enviroment variables (system variables). Restarting computer. But nothing seems to work.
Kindly let me know, what am I missing here.
These issues cannot be installed from the Package Manager console, so I had to browse lot of things to fix the issues and finally I got the solution.
Maybe we followed these scenarios
Missing Node.js software
Wrongly updated Windows environment path
Installed in the wrong path
Old version of Node.js software
You can download the latest Node.js software here.
Update Path
After installation, automatically create nodejs folder in this path “C:\Program Files (x86)” or “C:\Program Files “.
Open Control Panel -> User Accounts -> Change my environmental variable and verify the path Variable value “C:\Program Files (x86)\nodejs” or “C:\Program Files\nodejs “.
new => user = path => value = C:\Program Files (x86)\nodejs and after apply that.
and close Editor and restart it. it will work correctly.
note :- enter your path instead of copy of this path.
As dan-gph mentioned check the Path in environment variable using script $env:path -split ';' | Select-String nodejs and once you update the Path in environment variable, make sure to restart powershell and also restart explorer.exe. This would resolve the issue.
If you still face issues, check which nodejs you have installed (32bit or 64bit). Install 32 bit only as powershell or cmd are 32bit programs
Model for VSCode editor
C:\Program Files\nodejs
C:\Program Files\nodejs\node_modules\npm\bin
Search PATH environment variable.
Add the above paths into the Environment variables (both user
variable path and system variable path).
Restart VSCode.
Open a new terminal in VSCode
run node --version output should equal v16.13.0
If you installed NodeJs recently after opening the IDE like Visual Studio Code or any other IDE that includes the terminal you are trying. then try this.
Restart the IDE, If you installed NodeJs recently after opening the IDE like Visual Studio Code or any other IDE that includes the terminal you are trying.
Restart the CommandLine if you installed NodeJs after you opened the CommandLine.
I hope it will be fixed most of the time by following these simple steps.
Happy Coding!
open control panel then--
user accounts
|
user accounts
|
change my environment variables
|
new
|
(In variable name use)--Path
|
(In variable value use)C:\Program Files\nodejs
|
ok
After that just restart you terminal
chances are that you messed up with your system path, if it's the case, a very straight forward solution will be re-installing node and npm but don't forget to close and re-open powershell/cmd
Note: i thought that restarting computer has no effect on path but in an accident someone just deplug my laptop from power and after i turned it on everything was repaired and OK!
Reinstall/repair the application and close the vs code powershell
I've got the same error. Simply check below instructions. If all they are done. Just restart your computer. Then it will worked for me. I just restarted my computer.
List item
Missing Node.js software
Wrongly updated Windows environment path
Installed in the wrong path
1.find nodejs folder
go to environment variable in windows
edit path and add "find nodejs folder"
Restart computer
This issue corrected after updated my environment variable path
i just copy the path from path value in user to path value in system check image attachment.
https://i.stack.imgur.com/11uCk.png
path change image below
Go to Control Panel\System and Security\System on Windows 10.
Go to advance properties.
Advance system settings -> advance system settings -> Environment Variables Or type edit the system environment variables in the windows search.
Add "C:\Program Files\nodejs" ,"C:\Program Files\nodejs" and "C:\Program Files\nodejs\node_modules\npm\bin" to the user and system variable (path)
restart the cmd and run again.
Hope it will work.
I'm trying to set up Chocolatey for the first time. My ultimate goal is to be able to install the packages on a USB drive which shows up in my computer as F: so following the directions in the Chocolatey wiki, I created a folder on the F drive called Chocolatey and set an environmental variable ChocolateyInstall to F:/Chocolatey. I followed the basic directions, by opening up a command prompt and then pasting in the following.
#powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
After installation I went to the PowerShell command prompt as follows and tried to install Notepad++ I got the following:
C:\Windows\system32>cinst notepadplusplus
The filename, directory name, or volume label syntax is incorrect.
How can I fix this problem?
It appears that you went to a custom location with Chocolatey's install. When it finished the install, did it say it was installed on F:/chocolatey? Is it actually installed there? If so, take a look at your path environment variable and see if that is included in the path. Also close and reopen the shell/command line. Does it work now? If the path (user PATH) has the choco location in it and the shell/command line is not proper after reloading, then reboot and see if that fixes the issue.
If all of that is good, type just chocolatey /? and see what you get. Then try cinst again. If it has issues again, try cinst pkgname -debug and see where the error happens.
NOTE: Trying to install Chocolatey to a USB drive is not a supported case. Sure you might be able to get it to work but I'm not sure what you really gain. Say you install Notepad++, now it is installed to the system (not the USB drive). What do you gain by having the choco repository on the USB drive?