I just installed Anaconda (with GUI) for data science projects. I'm a Mac user and when I launch Jupiter notebook from Anaconda Navigator it runs macOS default terminal. Is there a way to set Anaconda for using iTerm2 as terminal?
If you open iterm2 and go to the toolbar(on the top of the screen), try iTerm2-make iterm2 default term. See if this changes the behavior.
If not and you prefer using iTerm2, you can always open up an iTerm2 window and simply type
jupyter notebook
And you should have a jupyter notebook open in your browser, with the process running in the iTerm2 window.
Based on the default installation of anaconda (and iterm2).
Make sure, iTerm2 is an default term - this probably wont help, but... Do that :D
Open iTerm, navigate in menu on iTerm2 > Make iTerm2 default term
When you open the jupyter for example from anaconda, default terminal launches with the script. The name of this script file should be located at the top, by default it is: /opt/anaconda3/bin/jupyter_mac.command
Navigate to /opt/anaconda3/bin/ folder, or any other one where the command file from previous step is.
from terminal: open /opt/anaconda3/bin/ which will open finder in this destination)
In this folder, locate the jupyter_mac.command file
CMD+I on this file (or right-click and select Get Info)
This will open Information window for this file. Under the accordion, there is a selection of "Open with".
Instead of terminal, select iTerm2
Ideally, click on Change All... button so all the .command files will launch in iTerm
Related
I am having trouble finding the shortcut call to open RStudio from the Anaconda Prompt. Does anyone know what to type?
For example, to open up VSCode you type into the anaconda prompt "code," and the VSCode ide is opened up rather quickly. Is there a similar call for RStudio?
Under Windows, JupyterLab does not allow navigation in the UI to any drive other than the drive that JupyterLab was started in. By default this is the C: drive.
How can you access notebooks on another drive?
Anaconda does not allow switching between drives but you can start Jupyter Lab or a Jupyter notebook on another drive, for example the D: drive.
First shutdown any running JupyterLab, then
Open a terminal window from within Anaconda Navigator. To do this, select environments in the Navigator window and then click the green "play" arrow next to base(root) -- or which ever environment you are using.
then in the terminal window type
jupyter notebook --generate-config
this will generate a file in your user directory under .jupyter\jupyter_notebook_config.py
edit the file.
Set the variable c.NotebookApp.notebook_dir to whatever directory you want to start in, for example
c.NotebookApp.notebook_dir = "D:\mydir"
NOTE do not put a trailing backslash. Also if the directory pathname contains spaces ensure you are using double quotes.
save the file and test that all is working. In the command line type
jupyter lab
this should start JupyterLab correctly, check for any errors in the terminal window. JupyterLab should start in the directory you set in the file.
If all is well, shutdown JupyterLab and run it from the Anaconda Navigator window as usual. All should work now.
As mentioned by GreyMS in this github issue, you can use an mklink:
mklink /D D_Drive D:\sources
I was trying to change the default starting directory of Anaconda Jupyter notebook on Windows 10
Conda version 4.3.31
Jupyter notebook version 5.2.2
From this link, I learned that I need to change c.NotebookApp.notebook_dir attribute to change the default directory.
I executed jupyter --config-dir to find the location of the configuration file and executed jupyter notebook --generate-config to generate the configuration file and changed c.NotebookApp.notebook_dir value to the directory I want.
Now if I run jupyter notebook command in cmd, it will start in the directory I mentioned. But if I run from the start menu, it is starting in the default folder.
Does anyone know why this is happening? I tried to change the path in the Start in field in shortcut properties of Jupyter Notebook. After doing that, I am not able to open from the start menu. When I click the Icon, it just opens and closes immediately.
I have (had) the same problem.
My workaround:
Anaconda (version 2018.12) installed in
C:\Anaconda3
When running from Start Menu right click on Jupyter Notebook. In my case there follow two more submenus. The first is More and the second is something like Open folder (I have a German Windows version, so I just can guess the English Menu texts.).
When opening that folder you will see a file (shortcut) with the name Jupyter Notebook. The folder in my case looks like this:
C:\Users\Andreas\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Anaconda3 (64- bit)
Right click this file (shortcut) and edit its properties. There you find the Target of the shortcut, which in my case is (rather longish):
C:\Anaconda3\python.exe C:\Anaconda3\cwp.py C:\Anaconda3 C:\Anaconda3\python.exe C:\Anaconda3\Scripts\jupyter-notebook-script.py "D:\Dropbox\ipython_notebooks"
where I edited the last entry, which is the folder where I store my notebooks.
After installing Anaconda(3 or higher) it includes Spyder. So it isn't known as an independent application. The problem with this kind of having Spyder is that Ubuntu doesn't allow to Duck it or add a Spyder shortcut on Desktop or add it as a Favorite. Therefore, every time I need to run Spyder, I have to run it through command line: $ spyder which is not the best and a fast way to run it.
On the other hand, I already have spyder and based on it's official website is not recommended to have it double installed: https://pythonhosted.org/spyder/installation.html
So I need a way which allows me to have a shortcut for my Spyder on Desktop or Favorites list or on Duck.
after searching a lot, here is what has worked for me: Copy any launcher from:
/usr/share/applications/.
Right click and go to properties, change the command line to spyder path:
~/anaconda3/bin/spyder or ~/anaconda/bin/spyder
Note: You can get the correct spyder path by typing: $ which spyder
Change the rest of the info like description and icon path as you like.
Save the file under something like spyder.desktop in order to set it as a desktop configuration file.
Now you have a app launcher which is connected to spyder (in Anaconda), copy the launcher to:
~/.local/share/applications/
Now the icon should pop up in your application menu.
Note: You should set the user as the owner. So this is the last step:
sudo chown <username> ~/.local/share/applications/spyder.desktop
How can somebody configure react-native run-ios to execute in iTerm instead of Terminal on OSX? By default, it opens a new Terminal window, but Terminal doesn't work as well with my window manager as iTerm does.
Daniel's solution worked, but as soon as I reinstalled node_modules it stopped working.
To make the change persistent, right-click on launchPackager.command in node_modules/react-native/scripts/ and choose Get Info… Then change the "Open with:" section to iTerm, and click on Change All…
The packager is started by executing open $PROJECT/node_modules/react-native/scripts/launchPackager.command, so whatever program is associated with *.command will be started. You can change the association:
Open Finder
Navigate to $PROJECT/node_modules/react-native/scripts/ (or simply create an empty file with the .command extension anywhere)
Right click launchPackager.command
Press the OPTION key
Under "Always open with..." you can select iTerm