Anaconda (Windows) alternative to nano? - python

So I've been following this tutorial to download Keras with a Tensorflow backend:
https://github.com/antoniosehk/keras-tensorflow-windows-installation
It has gone fairly smoothly, and I'm only stuck for a stupid reason on the final step. It asks me to run mnist_mlp.py to test if it is working, but I don't have that file downloaded. I figured I could just type 'nano mnist_mlp.py' and then copy over the code for the file and then run it, as I would do in Linux. However, since I am on windows, it is telling me in the Anaconda prompt that nano is not a recognized command.
So, how can I create a python file in Anaconda? I've tried looking it up several times, but nothing helpful has come up. Perhaps I am asking the wrong question, for I am quite new to python. Thank you!

You can use nano from the Anaconda prompt on Windows as long as the Anaconda prompt can locate the executable file in your file system.
Installing Git on Windows will often give you a version of nano that the Anaconda prompt can locate. If you don't want Git, you can also install nano from the conda-forge channel using conda:
conda install --channel conda-forge nano
Installing nano with conda should ensure that the Anaconda prompt can locate it.

Related

Can't launch Spyder after installing with pip

Python beginner here. I would like to use Spyder as my Python IDE. Alas the standalone version does not include pip and I want to work with "Vanilla Python" rather than Anaconda. So I installed Spyder via
pip install spyder, which works fine. However, when running spyder3 in the command window, nothing happens. I get no error, but Spyder does not launch either. While the Spyder website says custom installation may be tricky, it does not provide a guide on how to get it done. Does someone know how? OS is Windows 10.
you need to follow this commands:
python -m venv spyder-env
spyder-env/Scripts/activate.bat
pip install spyder
more info
Update: Tried again with Python 3.10.4. "spyder" now exists in the Scripts folder and does launch when typing spyder in cmd. Works for me now.

can't update spyder to 4.0.0b2

I'm trying to update Spyder to version 4.0.0b2 but I'm getting an error. I don't have a lot of experience with cmd or anaconda prompt, so I don't understand the problem. Any ideas?
I'm not on MS Windows but I see several things in your screenshot
You are on base environment
You already have spyder 3.3.3 and that means that you have to use conda update spyder or uninstall it and then install it with your command conda install -c spyder-ide spyder=4.0.0b2
The same with all remaining packages mentioned there (preferably one by one since some may disappear like the kernel one when you uninstall spyder 3.3.3)
If you see that Anaconda cannot find the package in your current channels, try via proposed channels on Anaconda Cloud like conda search --override-channels --channel URL/PACKAGE
Hope it helps (:

K-modes python installation using Anaconda

I am trying to install K-modes package in Anaconda.
I cannot find it in Anaconda anywhere.
How do I download and get it to work through an Anaconda distribution?
I am on Mac and have just managed to install kmodes using pip and open in jupyter notebooks in Anaconda. If you are on Windows this might work differently, but you can try it.
First of all I opened the general terminal and I entered
conda info --envs
This shows you what virtual envs have been created in anaconda. It should show you one that says base/ at the start. Simply write source activate and then copy and past the base pathway, and press enter. This will open your anaconda environment.
Then you can do pip install kmodes and enter, and this will install kmodes into your anaconda environment.
I hope this works for you!

Anaconda install fails. Install vscode fails

I cannot install 64-bit Anaconda 3 on Windows 10. It says the install is complete but when I proceed to install VSCode, it fails. It says to check my internet connection and to look in the log file. But my internet connection is fine and there is no log file. I am running the install with Windows Defender turned off.
When I look at the start menu, none of the components except for Anaconda Prompt, are there. I would like to have Spyder and Jupyter, for example, but they are not there.
If I install the 32-bit version, it works fine. But I need the 64-bit version
Similar issue here. For easy VS code installation with 64-bit anaconda version, you can follow this way:
Install ananconda navigator typing this on shell:
conda install -c anaconda anaconda-navigator
Open anaconda navigator:
anaconda-navigator
It opens a GUI anaconda interface. You can install VS Code from here, only click Install:
It stays Installing dependencies for me all the time, but after reboot, appears installed and works properly.
Hope it helps. It would be interesting to know how to obtain this with conda commands avoiding navigator installation.
I simply close the navigator and open Anaconda Navigator as Run as administrator
and my problem solved.

Why isn't Anaconda for Windows Installing Properly?

Anaconda 2 and 3 are installing without errors. I reboot because the installer prompts me to do so. When I open the Anaconda Prompt, python, pythonw or activate.bat aren't found. Looking in the Anaconda[2|3] folder, I can't find expected .exe and .bat files. What's going wrong?
I also notice that conda update --all wants to update many libs and eventually errors out.
Anaconda installs and updates can silently fail due to conflicts with 3rd party antivirus (for me it's WebRoot) programs. An indicator of Anaconda antivirus conflicts is missing .exe and .bat files, and sometimes requests to reboot. The fix is to shutdown the antivirus program and reinstall Anaconda. I suspect Anaconda isn't following correct Windows installer procedures as it's the only installer than conflicts with WebRoot.
INSTALL IT IN A EXTERNAL DISK!
I had a hard time tryig to install anaconda, because it was never complete, always missing anaconda navigator and the prompt. And after a cicle of install/unistall adopting different approaches, the only thing that made anaconda finally work properly in my computer was installing it in a exterior disk (or a pen drive).It just solved my problems, so give it a try!
Inspired from : https://github.com/ContinuumIO/anaconda-issues/issues/732#issuecomment-
****** UNINSTALL ALL PYTHON INSTALLATIONS, OTHERWISE THEY WILL GET MESSED UP AND YOU CANNOT CLEANLY UNINSTALL THEM WITHOUT WINDOWS RESTORE, or at least I think these two problems were related *****
Install Miniconda
As Admin open CMD and change to directory where Miniconda is installed
pythonw.exe -E -s "Lib_nsis.py" addpath
pythonw.exe -E -s "Lib_nsis.py" mkdirs
pythonw.exe -E -s "Lib_nsis.py" mkmenus
run conda init to start the environment. Then exit that CMD
I then ran Anaconda prompt from start menu, but you likely can use CMD
note) if you run "conda list", you will see no packages installed, but good news is conda will install pacakges, so:
conda install numpy
note) this will install conda! lol
conda install anaconda

Categories