Why is PowerShell "not recognized" when installing Chocolatey? - windows

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\

Related

Getting Started w/ Anaconda

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.

How to bypass the Elevated prompt error during silent installation

I am trying to download and silently install Anaconda on user's computer by using a batch file. The command that is used in my batch files is according to the original documentation of Anaconda. However, every time I run this batch of code, it gives me an error that says:
Installation for all users requires an elevated prompt.
This however only happens when I set the installation type to AllUsers. If I set the installation type to JustMe, it will be able to download and install Anaconda.
curl "https://repo.continuum.io/archive/Anaconda2-4.3.0.1-Windows-x86.exe" -o "prerequisites\\Anaconda2-4.3.0.1-Windows-x86.exe"
%cd%\prerequisites\Anaconda2-4.3.0.1-Windows-x86.exe /InstallationType=AllUsers /RegisterPython=1 /S /D=C:\Anaconda
Unfortunately, I need to find a way to set the installation type to AllUsers. I had also tried running the batch file using administrator mode but to no avail. Can anyone tell me what I am missing out? I've been on this for days and still could not find the correct solution to this.

Why is 'ruby' not recognized as an internal or external command?

Path in user variable is the default path from the installation:
C:\RailsInstaller\Git\cmd;C:\RailsInstaller\Ruby1.9.3\bin
Path in system variable is directed to:
C:\RailsInstaller\Ruby1.9.3\bin
When I open the Command Prompt with Ruby and Rails, the command prompt says "'ruby' is not recognized as an internal or external command" immediately without any input.
The command prompt worked before. After I re-installed it using various methods due to unsuccessful setup, it got like this.
How can I fix it?
Please restart cmd before running ruby command.
In Windows PC:
To add bin path of your installed ruby to PATH environmental variable
1. right click on "My Computer" -> Properties -> Advanced System Settings -> Environmental Variables -> Select "Path" ->Edit
Example path shown below:
D:\Ruby22\bin;
2. Restart cmd after changes
Refer below image:
Ruby Path setting in Windows 7 and other windows OS
So,
C:\RailsInstaller\Ruby1.9.3.\bin is the place where your ruby.exe is saved?
If that's correct, you should be able to access the ruby commands via the Command Prompt.
When you try: REG QUERY "HKCU\Environment" in the console, is there an output like?:
PATH REG_EXPAND_SZ C:\RailsInstaller\Ruby1.9.3.\bin
Ensure you have the correct x32 or x64 bit version of Ruby
installed.
Ensure you have the PATH environment variable setup, this should be
done automatically if selected upon install.
Lastly ensure you restart your command prompt.

Sencha touch SDK command tools version3 commands on Mac not being recognised

I am trying to run Sencha touch commands on my macbook pro but I am getting an error when
I run this command 'sencha' to test if the SDK command tools is installed properly.
the error message is this: -bash: sencha: command not found
Can someone help me resolve the issue please?
Command Not Found
Upon running sencha, if there is an error message appears saying "sencha: command not found" on OS X / Linux or "'sencha' is not recognized as an internal or external command, operable program or batch file." on Windows, follow these steps to troubleshoot:
Close all existing terminal / command prompt windows and re-open them.
Make sure that Sencha SDK Tools is properly installed:
The installation directory exists. By default, the installation path is /Applications/SenchaSDKTools-{version} on OS X, /opt/SenchaSDKTools-{version} on Linux, and C:\Program Files\SenchaSDKTools-{version}
The path to SDK Tools directory is prepended to your system's PATH environment variable. From the terminal, run echo $PATH (echo %PATH% on Windows). The SDK Tools directory should be displayed in part of the output. If this is not the case, add it to your PATH manually.
The environment variable SENCHA_SDK_TOOLS_{version} is set, with the value being the absolute path to the installation directory mentioned above. For example: If the installed version is '2.0.0-beta2', a SENCHA_SDK_TOOLS_2_0_0_BETA2 must be set. From the terminal, run echo $SENCHA_SDK_TOOLS_2_0_0_BETA2 (echo %SENCHA_SDK_TOOLS_2_0_0_BETA2% on Windows). If the output is empty, set the environment variable manually.
http://docs.sencha.com/touch/2-0/#!/guide/command

Cannot use jar command on windows

The jar command is not working on my box. I have downloaded the jdk, and set the envar "Path" to include the path to the jdk \bin directory. However, I still get that annoying message, "'jar' is not recognized as an internal or external command, operable program or batch file." Does anyone have any suggestions to solve this problem?
I think from the error message that you're using Windows?
If so, did you try it in a command prompt that you opened after changing your path using the GUI? And did you double check for typos in the path you added?
You can always try running "echo %PATH%" to check your path, and ensure your change is both showing up and error free
Can you paste the result of env command ? Or please launch new command prompt, then please try again if you think you configuration is Ok.

Resources