Note that the environment construction on the remote server is quite different from the local environment, so don't forget it.
Use conda instead of pipenv.
$ conda create -n [Virtual environment name] python==[version]
After entering the virtual environment, perform the operations from 2. onward.
$ source activate [Virtual environment name] #Enter the virtual environment
$ source deactivate #Get out of the virtual environment
Update pip itself.
$ pip install --upgrade pip
Execute the following only for the first time.
$ conda config --append channels conda-forge
This will increase the package installation success rate (easiness to find).
$ conda install [package name]==[version]
$ pip install [package name]==[version] #When you can't find it (not recommended?)
First, install the package.
$ conda install jupyter jupytext
Enter the following in order.
$ ipython
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password: [Enter password]
Verify password: [Enter password again]
Out[2]: 'sha1: [Hashed password]' #I will use it later, so copy it
In [3]: exit
$ jupyter notebook --generate-config
$ vi ~/.jupyter/jupyter_notebook_config.py
The vi editor opens, so add the following at the end.
#jupyter settings
c = get_config()
c.IPKernelApp.pylab = 'inline'
c.NotebookApp.ip = '*'
c.NotebookApp.password = 'sha1:[Hashed password]'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 8888
#jupytext settings
c.NotebookApp.contents_manager_class = 'jupytext.TextFileContentsManager'
c.ContentsManager.default_jupytext_formats = 'ipynb,py'
You can now use Jupyter Notebook.
$ jupyter notebook # http://[IP address]:8888/Login from
Note on how to use the conda command Start jupyter notebook on the remote server and use it in the local environment [How to install Jupyter Notebook using Pipenv] (https://qiita.com/SUZUKI_Masaya/items/76b927b9812d77d33e57)
Recommended Posts