5

I have a Unix server where I have Python3 installed. I ssh to the server from my mac.

I was wondering if it possible to install Anaconda and Jupyter (will come with Anaconda) on the server so that I can just pull up Jupyter on the server terminal and run codes on jupyter running on the server.

Is it possible? And if yes, could someone guide me to the right link?

3 Answers 3

15

in a terminal on your remote server:

#download anaconda (change version if you want)
wget https://repo.continuum.io/archive/Anaconda3-2018.12-Linux-x86_64.sh

# run the installer
bash Anaconda3-5.1.0-Linux-x86-64.sh

# so changes in your path take place in you current session:
source ~/.bashrc

#To run a remote notebook, replace XXXX with your choice of four numbers like 9191
jupyter notebook --no-browser --port=XXXX
#copy the url that you get as a result

Then in your local machine, open up a terminal and write:

#XXXX is the port you specified in the previous step, YYYY is a local port, for example 9999 to keep it simple
ssh -f [USER]@[SERVER] -L YYYY:localhost:XXXX -N

Then copy the url from the previous step, paste it in a browser, since you used the same port, you don't have to change anything on the url

6
  • Getting this error when running on server terminal ERROR: cannot verify repo.anaconda.com's certificate, issued by ‘CN=COMODO ECC Domain Validation Secure Server CA 2,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB’: Issued certificate not yet valid. To connect to repo.anaconda.com insecurely, use `--no-check-certificate'.
    – Baktaawar
    Commented Jan 18, 2019 at 22:10
  • Go to anaconda.com/download and copy the link to download the appropriate anaconda version, use that instead of repo.anaconda.... Commented Jan 19, 2019 at 3:50
  • Problem is there is no link as such on the downloads page. If i choose Linux download and right click copy link doesn't copy the link. It starts downloading it
    – Baktaawar
    Commented Jan 22, 2019 at 18:41
  • Ok I did copy the address of Linux download and then ran wget on terminal. It gives me this error : Proxy request sent, awaiting response... 200 OK Length: 584008163 (557M) [application/x-sh] Anaconda3-2018.12-MacOSX-x86_64.sh: Permission denied
    – Baktaawar
    Commented Jan 22, 2019 at 18:43
  • that you may fix by using sudo (as in sudo wget ...), or moving to a directory where you have permission to write files Commented Jan 22, 2019 at 20:43
1

you can download anaconda using:wget https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh and install using: bash Anaconda3-5.1.0-Linux-x86_64.sh

After that just source the path of Anaconda in .bashrc file, it should work.

To access jupyter notebook, you can use ssh and run notebook in your browser on your host. Steps are mentioned in this link

1
  • Can I access the same from remote windows machine ? Commented Mar 28, 2024 at 15:14
0

Yes you can install anaconda on your linux machine (Server) and manage the python environment. But if just need Jupyter hosted in a server, just install Jupyter only and start the service which will server Jupyter Notebook. Access Jupyter notebook using your browser on any other PC.

Make a google search that how to install anaconda on Linux machine (Centos/Ubuntu etc) After installation run following command

conda info

and then configure the Jupyter and run.

Simple way (Install Jupyter on a server): Install, Run, and Connect to Jupyter Notebook on a Remote Server

2
  • did this wget repo.continuum.io/archive/Anaconda2-2018.12-Linux-x86.sh Gave this error Proxy request sent, awaiting response... 200 OK Length: 543837797 (519M) [application/x-sh] Anaconda2-2018.12-Linux-x86.sh: Permission denied
    – Baktaawar
    Commented Jan 22, 2019 at 18:35
  • Strange you have to use ssh to connect to the http server jupyter is. Seems to be overkill and unnecessarily complicates things to a point where half of interested people give up. Doesn't seem to be very intelligent to create something and then make it as impractical to use as possible. Commented Oct 18, 2020 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.