Through some wizardry I cannot recall, I managed to install and implement Jupyter Notebook with an icon that opens Jupyter directly in browser
I am occasionally asked how I did this. However, and slightly emparisingly, I cannot remember how I did this and am unable to help. I cannot seem to recreate this Jupyter Icon in any other set up
Also, in attempting to recreate this Icon, I somehow managed to implement two Anaconda Prompts, Anaconda PowerShell Prompt and Anaconda Prompt
What is the difference between the two? Which one should I remove?
I somehow managed to implement two Anaconda Prompts, Anaconda PowerShell Prompt and Anaconda Prompt
That is standard. The first Anaconda Prompt, will open the legacy cmd configured for conda. The second will open a powershell configured for conda. SO just keep both and use the one you are more comfortable with.
How to open jupyter notebook from Windows 10 task bar
Simply search for jupyter in the start menu and select Pin To Taskbar
Creating it manually
In case the above does not work, then you can manually create a shortcut and pin it to the taskbar. For that, we will need two paths, which for me are these:
pathBase=C:\Users\FlyingTeller\miniconda3 #main folder of miniconda (or anaconda)
pathEnv=C:\Users\FlyingTeller\miniconda3\envs\py37 #Folder of the environment where jupyter notebook is installed
Then you do the following steps:
Right Click on Desktop->New->Shortcut, enter as target path:
<pathBase>\python.exe <pathBase>\cwp.py <pathEnv> <pathEnv>\python.exe <pathEnv>\Scripts\jupyter-notebook-script.py "%USERPROFILE%/
replacing the paths with the ones from above. Save the shortcut and then do Right Click->Properties.
Now you can change the Start In directory to wherever you want the notebook to start. Additionally, you can change the icon to the jupyter icon, which is in
<pathEnv>\Menu
Now you have
A shortcut to start the notebook on your desktop
The possibility to simply do Right Click-> Pin to Taskbar for that Shortcut
Search for Anaconda Navigator in your computer then Right Click and Select "Open file location".
In the folder that is opened you can find shortcuts of programs that are installed via anaconda. You can copy and paste them anywhere you want.
Related
I know this question is frequently asked, but none of the answers solved my problem.
I use VS code for bunch of things : Python, html css javascript php, Ruby etc.
I use anaconda for Python. However, I can only run python with anaconda when I open VS code by the anaconda navigator.
I tried the to do the same thing as it automatically does with anaconda navigator :
Setting the same interpreter, the good language etc.
But when I try conda activate base (which is automatically written with anaconda and works), it gives me an error. It's not an huge problem, but it's just annoying to open anaconda everytime. What should I do ?
make sure you have your anaconda path added to the windows path.
to add anaconda to the windows path follow this:
search "environment" in windows search.
click on "environment variables"
in the system variables area. look for "path" variable. select it and click on edit.
add the following (make sure the addresses are correct in your case first).
if you do not know where is anaconda installed on your PC. open cmd from anaconda navigator and write "where conda"
When I want to exit everything, do I first quit terminal or the notebook in browser or what exactly?
EDIT AS REQUESTED: I first launch Anaconda by searching in Spotlight for "Anaconda" and launching it (NOT through the terminal). After Anaconda opens, under Jupyter Notebooks I click "launch" (again not through the terminal). Jupyter Notebooks opens in my default browser but the terminal also opens. My question is, is the terminal also supposed to open as I mentioned or did I do something incorrectly with my installation of Anaconda?
Yes. When you open notebook terminal also opened. First, quit notebook & then terminal.
I'm using Windows 10 and I have my Spyder executable linked to my Start button. I used to be able to click the Spyder icon and launch the executable and Spyder would start. Now, for some strange reason, I have to launch Anaconda Prompt and type 'spyder' into the cmd window. Then, and only then, I can launch Spyder. Here is the path, from the Spyder properties.
If I right-click Spyder and click Properties, I can see the target is set to this:
C:\Users\Excel\Anaconda3\pythonw.exe C:\Users\Excel\Anaconda3\cwp.py C:\Users\Excel\Anaconda3\envs\spyder C:\Users\Excel\Anaconda3\envs\spyder\pythonw.exe C:\Users\Excel\Anaconda3\envs\spyder\Scripts\spyder-script.py
How can I reset this to work like it did before? I'm guessing there is a way to do it through Anaconda, or maybe there is a setting somewhere on Spyder. A point in the right direction would be greatly appreciated.
After a bit of playing around I got this to work.
1) Open the Anaconda Command Prompt (as administrator)
2) Execute "C:\Users\...\Anaconda3\pythonw.exe" "C:\Users\...\Anaconda3\Lib\_nsis.py" mkmenus
I use to have idle. Then I downloaded Anaconda and opened idle through there. I have not used idle for a while but just recently went to go open it up and use it again. However, it seems I no longer have idle on my computer, to my understanding I can still get to idle through Anaconda but I forgot how. Is there a way to open idle through Anaconda without re-downloading idle? If so what command can I use to pull Idle up?
Search for this folder "idlelib" in the Lib folder of the Anaconda version you have installed and you will find idle (check its file type: "compiled python file").
Pin it to your taskbar and run.
You are looking for C:\... <\> ...Anaconda3\Lib\idlelib\idle.bat
There is also C:\ ... <\> ...Anaconda3\Scripts\idle.exe which seems to run a little smoother, but there has to be a Command Prompt open in the background to run. ... ?
Navigate to your Anaconda3 installation folder. Yours could be anywhere, mine is at "C:\ProgramData\Anaconda3", but I installed for all users and you could have selected a random location on your drive. If you managed to add it to the environment variables you could easily find it by running the Command Prompt (not Powershell - has to be Command Prompt) and typing where conda or where anaconda and pressing enter. You should find a folder named Anaconda3 or something of that nature.
If you navigate to this folder, and within it find the "Anaconda3\Lib\idlelib\" folder, within it there is a file called "idle.bat". If you find this "Anaconda3\Lib\idlelib\idle.bat" file you can double click it to run IDLE, although it may be a little messy/outdated/glitchy/strange since you are updating all kinds of folders within Anaconda and some of them may have helped idle.bat run. Mine has a the spyder icon associated with it in the task bar and a blotted out IDLE icon in the top left corner for some reason. You could of course run the full path in command prompt as well if you already know where it is, for instance I would run...
C:\Users\Thomas>C:\ProgramData\Anaconda3\Lib\idlelib\idle.bat
~or~
C:\Users\Thomas>C:\ProgramData\Anaconda3\Scripts\idle.exe
--> It may be easier to just download a new version of Python side by side with Anaconda to run IDLE. I have been attempting to set a shortcut in the Start Menu that runs from anaconda properly for days and have failed. This way, there should be a right click>'run with IDLE' option for python files.
I believe the tilde slash (~/) was meant to imply your home directory since that is what it signifies on a linux machine, but seeing as you could have put it anywhere on the machine, even directly on the C:\ drive, maybe he meant 'unknown file path'.
If you are running MacOs (currently I am on Catalina - MacOs10.15) it is quite simple to run IDLE from Anaconda environment:
Launch Anaconda
Go to MacOs Terminal.
Type IDLE3
warning: if you type IDLE, the Python 2 IDLE will be opened ... but if you are using Python3 installed with Anaconda ... it doesn't work properly.
Previously, I had Canopy installed and at that time, I could simply double click on ipynb files and open them into the browser.
However, later I needed Anaconda and once I installed it, this feature was gone.
Now I just want to be able to simply double click on ipynb files and the file gets open into the Firefox. Is it possible?
I read about this:
nbopen
pip install nbopen
python -m nbopen.install_win
But it didn't solve my problem. I appreciate any help.
Yes, this is possible. Running python -m nbopen.install_win installs the executable nbopen.exe in the Scripts folder of your anaconda directory. For me this is:
PS> (gcm nbopen).Path
E:\Programs\anaconda\Scripts\nbopen.exe
The first line gets the path of the nbopen command (using PowerShell). If you are not using PowerShell you can find your conda directory by right-clicking on any (I)Python executable in your start menu and look at where it links to.
You can then associate the nbopen.exe file with the .ipynb filetype:
Right-click on a .ipynb file.
Click on Properties
Click on the Change button next to "Open With:"
Click on Browse, browse to the path you found out and select nbopen.exe.
Double-clicking on .ipynb files now checks if a notebook server is running and opens the notebook. If no server is running, one is started in the active directory.
Checkout this Firefox plugin. Python Notebook Viewer.
This plugin lets you view/render python notebooks without running notebook server. Once installed, set Firefox as default app to open ipynb files. From now onwards, you can simply open ipynb files by simply double clicking on it!
This saves a lot of time as most of the time developers are just keen on seeing a code. It also saves a hassle of browsing directories in Jupyter Notebook window to reach to a specific file.
If m00am's solution doesn't work and nbopen.exe file doesn't show up then do the following:
Uninstall Anaconda.
Install Anaconda again and make sure you add Anaconda to Windows path during the installation.
Then try m00am's solution again.
This worked for me:)