Different versions of Python, packages and many terminals in Anaconda - python

I am using Windows 7 and already installed Python version 3.8.10. After installing Anaconda 4.9.0, I open Jupyter Notebook and see that Python has a brother, version 3.8.3. Should I remove one?
Not only that, all Python packages in Jupyter have different versions than existing ones. I also find out now there are a lot more terminals: one is from drop-down "New", one is called Anaconda prompt and the last one is Anaconda Powershell prompt, not to mention the usual windows terminal.
Can anyone please give a simple explanation about this and please indicate which terminal should I use to install and upgrade packages for Jupyter Notebook?

Been a while I used windows, but I'll tell you this. Anaconda is a suite of tools and you don't have to use everything. Anaconda prompt and Anaconda Powershell are basically the same, it's just that the Anaconda prompt uses a Windows command prompt while the other uses a Windows Powershell as a base.
I'll say use the Anaconda prompt since it should feel more welcoming and easy to use.

Related

Trying to use numpy in intellij, But it won't work

I tried the command in my cmd and this is what is said, I don't really know what it means though, and I still can't use NumPy in IntelliJ.[This is the whole thing, it says NumPy isn't there even though I find it in the external libraries when I go through them.]
Make sure that your IDE (wherever you're running your Python program) runs in the same environment that the one where you install your packages. It appears like you have 2 environments: One with "native Python" installed in your machine (where your program runs), and an Anaconda environment (where you installed numpy).
I recommend you stick with Anaconda and use it only. In your Start Menu, search for "Anaconda Prompt". There you can install any packages you want, but it seems numpy is already installed. Then you can type, for example, code to open VS Code, or jupyter notebook to run Jupyter. Or type python and start coding.
But if you really want to use a program outside Anaconda environment, then you have to install your packages in your "native Python" environment. You can do such using the Windows cmd or PowerShell, instead of Anaconda Prompt.

Why isn't Anaconda distribution functioning on Windows 10 64 bit?

I am having trouble getting the Anaconda distribution to function properly on my Windows 10 computer (64 bit).
I downloaded the 64 bit graphical installer for Python 3.7. I installed Anaconda for all users and it lives in this path:
C:\ProgramData\Anaconda3
(I also tried to install for “just my user” but it didn’t help.)
The issue is my computer does not recognize Anaconda. When I open my command prompt and enter in “conda” , “jupyter notebook”, or “python” - I get an error message below:
'conda/jupyter/python' is not recognized as an internal or external command,
operable program or batch file.
I uninstalled and reinstalled and selected the checkbox during the setup wizard to “add Anaconda to my PATH environment variable” and I still received the same error message when using the command prompt to locate Anaconda.
I then manually attempted to add the following paths to my PATH environment variable (for both user and system variables):
C:\ProgramData\Anaconda3
C:\ProgramData\Anaconda3\Scripts
C:\ProgramData\Anaconda3\Library\bin
That still did not work. I restarted my computer and tried it again - did not work.
I also cannot use Anaconda Prompt or Anaconda Navigator. I understand that they are supposed to be available through the start menu after installation, but they are not. I have also tried to locate them through the Command Prompt but they are not there either.
Overall, I have restarted my computer and reinstalled Anaconda numerous times and nothing has worked. I’m not sure what to do next.
I have discovered the answer! It seems that my virus software (McAfee Endpoint Security) was blocking Anaconda from working correctly. The workaround was to install an older version of Python (I used the Dec. 2018 version) from the Continuum repo here.
open up a windows cmd prompt and try set PATH=/c/programdata\anaconda3:$PATH It is important to note that the exe file for Anaconda is _conda.exe. So to check if this was successful type which python and which _conda into the command prompt.
I tried to install Anaconda 3.7 in windows 10 and, for some reason, only the 32bit version worked. For the 64bit I can't find the launching icons and conda commands are not recognized in the cmd.
Downloading a previous version of the anaconda distribution might do it.
Check out the archive to find and download your choice of preference.
I installed the earlier anaconda32020.02 64 bit from the archive and it worked fine.
I'll update to 2020.07 at a later(debugged) date.

Anaconda3 activate.bat is not recognized as an internal or external command

I have downloaded Anaconda3 for windows 64-bit operating system. After the download and install completed, I opened the Anaconda prompt but it give me this nice error:
'C:\Anaconda3\Scripts\activate.bat' is not recognized as an internal or external command,operable program or batch file.
I just surfed the internet and found a solution to uninstall all previous packages of python but did not work. I have searched for activate.bat file in my system " found it in one folders of anaconda directory " and copy, paste it to the Scripts folder but it gives me errors with conda packages and dependencies. Any solutions please!!
I cannot run any either jupyter notebook or conda as well. Actually, I do not know how to find them in those bunch of Anaconda files and packages.
Thanks in advance,,,.
This is a known Anaconda bug:
From their Github:
" I have fixed the underlying bug here but we will not release new Anaconda installers for a while.
The fix is in the latest Miniconda installers:
64-bit:
https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe
https://repo.continuum.io/miniconda/Miniconda2-latest-Windows-x86_64.exe
32-bit:
https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86.exe
https://repo.continuum.io/miniconda/Miniconda2-latest-Windows-x86.exe
Install those, then run the Anaconda Prompt and install whatever packages you need. If you want the latest full Anaconda release then use:
conda install anaconda=5.0.1"
Check this github thread for the full answer: https://github.com/conda/conda/issues/6053
When you installing Anaconda3 on Windows 10 and the Anaconda Navigator menu item does not install, and running the Anaconda Prompt gives the activate.bat error.
Delete all instances of the previous python IDEs
Reveal hidden files within the control menu
Go to -> C:\Users[Username] in windows explorer
Delete the files .conda and .anaconda. Possibly others if you had other IDEs.
Go to -> C:\Users[Username]\AppData\Local
Delete all python related files conda, python, ect.. any instances other python IDEs
Go to -> C:\Users[Username]\AppData\Roaming
Delete all python related files conda, python, ect.. any instances other python IDEs
Run the Anaconda installer as Admin and install in a directory such as C:\anaconda3
Sit back and wonder why an install took 4 hours out of my life and start drinking.
At some point I felt like this was a test for the uninitiated... can I start coding now?
I think the problem will be solved by clearing all dependencies. I initially had python installed, 2.7 and 3.6. I just get rid of all of them. The problem is not solved yet.
I discovered that My MySQL server is running. I just closed it but it did not work. I just uninstalled it completely and The problem is solved. Anaconda needs to listen to , I think 8888 port, which might be used also by MySQL server as well.
I hope this will help.
I had the same issue and solved it like this:
Open a command prompt (cmd.exe)
Execute these commands to reset two environment variables:
set PYTHONPATH=
set PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
Start the installer (from within the same command prompt).
Now the installation will succeed!
Tip: if 'Anaconda Prompt' in the start menu isn't working afterwards, use this workaround:
C:\Users\<username>\AppData\Local\Continuum\anaconda3\Scripts\activate.bat C:\Users\<username>\AppData\Local\Continuum\anaconda3
I solved it
If you install other python directories or install anaconda on your drive. remove them all
and visit to C:\Users\<username> and you can find this babies
.anaconda
.conda
Kill them all, reinstall anaconda.
Now it works well.
I uninstalled any previous versions.Restarted system and installed Anaconda again at path C:\Users\xyzuser\Anaconda.It is working now
I solved it with:
0. Rename/delete previous Anaconda3 directory (at c:\ProgramData\Anac...) (show/check hidden items at File Manager to delete it)
1. Re-install Anaconda
2. At Advanced Installation Options, I check both:
2.1. [check] Add Anaconda to my PATH environment variable
2.2. [check] Register Anaconda as my default Python 3.6
3. then click Install button
4. Done
my OS: windows 10, 64bit
I have met exactly the same problem when I was using anaconda 5.3.1 on windows10.
Well, the solution is to uninstall your anaconda and re-install it.
And when you install anaconda, you can't close the exe command window manually which would show up at the end of installing. You should let it run and exit by itself. Only by this way your anaconda would be installed correctly.
The Fix is simple. Here's what you need to do.
Go to--
C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\Scripts\
*Replace USERNAME with your own***
If you are not able to access this location, then directly search in your C drive for Continuum, and from there you can write the rest of the URL
Search for "Activate.bat"
If you are able to find this file, then go to ANACONDA PROMPT and
Change your directory by typing:
cd C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\Scripts\
*Replace USERNAME with your own***
Your directory is now projecting to this new location.
Now type:
activate.bat
Hit enter
Now you activated your Anaconda.
Now, you can check if it is working or not by typing
Conda list

difference between command prompt and anaconda prompt

I installed anaconda into my computer using python. After I install the software, I found there is one program called anaconda prompt.
What is the difference between anaconda prompt and command prompt? If I want to update the package, which one I should use or either one. Like (conda update conda)
Thank you
Anaconda command prompt is just like command prompt, but it makes sure that you are able to use anaconda and conda commands from the prompt, without having to change directories or your path.
When you start Anaconda command prompt, you'll notice that it adds/("prepends") a bunch of locations to your PATH. These locations contain commands and scripts that you can run. So as long as you're in the Anaconda command prompt, you know you can use these commands.
During the installation of Anaconda there is a choice to add these to the PATH by default, and if checked you can also use these commands on the regular command prompt. But the anaconda prompt will always work.
As far as updating conda, if it doesn't work in command prompt, you can do
conda update conda
in Anaconda command prompt.
When you use anaconda command prompt it opened at conda directory (path where all the conda commands run)
like when I was installing pip3 install prettytable on command prompt it successfully installed but not replicate in jupyter notebook.
But when install it using anaconda prompt it replicates intantly
Here is the difference:
PATH-TO behind is the path to Anaconda3
Afer adding the following env to Windows command prompt, it will be the same as Anaconda prompt:
set CONDA_DEFAULT_ENV=base
set CONDA_PREFIX=PATH-TO\Anaconda3
set CONDA_EXE=%CONDA_PREFIX%\Scripts\conda.exe
set CONDA_PROMPT_MODIFIER=(base)
set CONDA_PYTHON_EXE=%CONDA_PREFIX%\python.exe
set CONDA_SHLVL=1
set Path=%CONDA_PREFIX%;%CONDA_PREFIX%\Library\mingw-w64\bin;%CONDA_PREFIX%\Library\usr\bin;%CONDA_PREFIX%\Library\bin;%CONDA_PREFIX%\Scripts;%CONDA_PREFIX%\bin;%CONDA_PREFIX%\condabin;%Path%
I see great answers but maybe it is a little technical for beginners. Anaconda is a (software) distributor, in this case for Python, and its anaconda command prompt is similar to windows command prompt with one important difference: having PATH. PATH, as it can be assumed from its name, is like an address in computer where python packages are installed and their computations will be run.
Having PATH makes a big difference between using python via anaconda prompt or normal command prompt which is considered useful for many research teams and business computers: it will allow you to install, update and uninstall packages inside a separate environment (after creating one!) so that other members of the team wouldn't be disturbed.
When I was working with my own laptop, I never had any problem with running python on jupyter using windows command prompt. But for working with a research team PC, my supervisor made me to create a virtual environment named after me in anaconda prompt just not to disturb any other member. Actually, that was a pain in my neck because I have to activate "my environment" every time before starting python on jupyter. I never understand why someone should not appreciate if I install any more extra packages or updates for them? Not to mention, if in a million years an error pops up due to a package I installed, they can simply uninstall or downgrade it.
So as a normal researcher with medium computations in python, I never liked working with anaconda prompt and windows command prompt was everything I needed, especially on my OWN laptop.
I hope you liked my idea.

fail to make anaconda spyder my default python platform

I am new to Python. I used Windows 7 System. I installed Python 2.7. Then I installed Anaconda. When I installed Anaconda, I selected the following.
Therefore, I think it Anaconda should be regarded as my default Python platform. However, when I checked cmd. The result is as following.
It seems that the default Python platform is still not Anaconda. HoW to change default Python platform to Anaconda Spyder? I tried to unload Anaconda and re-install it again, but it doesn't help. Thanks a lot.

Categories