no conda.exe -- need help installing anaconda properly on ms windows 10 - anaconda

I am encountering issues when installing anaconda 5.1.0 64-bit python 2.7 on windows10.
Q&A in the Setup dialog: There are two questions (1) I did not checkbox "add anaconda to my PATH env variable" because it is discouraged. (2) I also did not checkbox "register anaconda as my default python 2.7" because this might mess up my existing processes/scripts.
After this, it installs and declares victory; "anaconda prompt" shows up in start menu but that's about it. It opens a command prompt with
'C:\Anaconda2\Scripts\activate.bat' is not recognized as an internal or external command, operable program or batch file.
Will appreciate help in getting this install right. Thanks

Related

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/

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.

Anaconda Packages

I have Anaconda installed on my computer but when I type a command in cmd I only get 'conda' is not recognized as an internal or external command,
operable program or batch file. What could be the problem? It's the same with pip.
I can see that it is installed in my settings.
So Anaconda should have added jupyter to your PATH automatically during the install if you selected that option as shown in the installation video, if you did not select it, you need to do this manually, here are the steps to do so:
1)go to mu cpmuter properties and click on ADVANCE SYSTEM SETTINGS
2)Select the Advanced tab.
3)Click the Environment Variables button.
4)Under System Variables, select Path, then click Edit.
You'll see a list of folders, as this example for my system shows something like:
C:\Program Files\Windows Resource Kits\Tools\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;
You will notice that each of these file paths are separated by a semicolon ;
You can add additional folders that you want to include in searches. In this case, you need to add Anaconda to your path, it will be something like: C:\Users\myusername\Anaconda2
Add that to the list, make sure your spacing is correct
You'll need to restart the processes (e.g., command prompt) that use the system path to see the added folders.
-----------------------------------------------------------------------------## YOU CAN ALSO AVOID THIS MANUAL PROCESS ##
ANOTHER METHOD is reinstall this and while doing this make sure of thing that is shown in the scr shot below
while installing the anaconda the dialogue box appears giving two options
add anaconda to my path enviorment variable
register anaconda as my default python version
select both of this options though system will not recommend this but you have to mark
thankyou!!
all the best!!
Open your Anaconda Prompt instead of just your command prompt. Then type "conda list," you should get the correct output. I suspect that you did not add Anaconda to your PATH during installation and that's why your regular command prompt won't recognize the conda commands.
Find where you anaconda is installed. Usually, it is under %USERPROFILE%\AppData.... You can set path using SETX PATH on CMD. e.g. I have installed anaconda3. It was installed in its default path.
e.g.
SETX PATH “%USERPROFILE%\AppData\Local\Continuum\Anaconda3; %USERPROFILE%\AppData\Local\Continuum\Anaconda3\Scripts”
If you do not know where anaconda was installed, you can open "Anaconda prompt" app. You can see the environment path to your anaconda [You can find "Anaconda prompt" using Search Windows.

Having difficulty running pygame 2.7

Every time I try to run Pygame 2.7 version I get this prompt:
Windows cant open this file:
File name: pygame-1.9.2b1-cp27-cp27m-win_amd 64.whl
To open this file Windows needs to know what program you want to use to open it.
Windows can go online to look it up automatically, or you can manually select from a list of programs that are installed on your computer.
What do you want to do?
Use the Web service to find the correct program
Select a program from a list of installed programs
How can this be solved?
I've tried many Youtube videos.
That .whl file that you mention needs to be installed with a command-line tool called pip that comes with python. Assuming you are starting from scratch, here is what you need to do to install python and pygame. Also, as a minor sidenote, you are actually installing pygame 1.9.2 on python 2.7. Assuming you are interested in that particular version of python and pygame, here are the steps you need to follow.
To install python 2.7, you need to first go to the Python Software Foundation's website here. Go to the download section by clicking on the latest link for python 2.7.12. Scroll down and download either the x86 or x86-64 MSI installer (depending if you are on a 32bit or 64bit platform respectively).
Run the MSI installer. Most of the default options should be fine, nothing too tricky here.
After you run the installer, you need to add python to the PATH environment variable so that windows actually knows where python is on your computer. To do this, you need to find the Advanced System Settings section in your control panel (how to exactly get there varies depending on what Windows version you are on).
Once you are there, click the Environmental Variables... button. Under System Variables, we need to edit the value of the Path variable to include C:\Python27\ at the end of it. If all of the path variable stuff is on one line, you need to add a semicolon to separate it from the other paths in the list.
Congrats, now python 2.7 should be installed at this point! To test it out, open up the command prompt and type python. It should open up the interpreter in the command line and should be working.
Assuming it is working, exit out of the python interpreter. In the command prompt, type python -m pip install pygame. This should automatically install pygame for you. If you really want to use your wheel file, cd to the directory where it is installed and type python -m pip install pygame-1.9.2b1-cp27-cp27m-win_amd 64.whl.
Once that is done, you should have both python and pygame installed! Test it out in your IDE of choice (I personally use Geany) and start writing some code! Let me know if these instructions are clear enough.

Resources