<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sishi Liao on Medium]]></title>
        <description><![CDATA[Stories by Sishi Liao on Medium]]></description>
        <link>https://medium.com/@sishiliao?source=rss-1a23630b2615------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ZLlaK1VX9gazzZpp.</url>
            <title>Stories by Sishi Liao on Medium</title>
            <link>https://medium.com/@sishiliao?source=rss-1a23630b2615------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 08:00:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sishiliao/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Linux virtual env setup with certain Python version for running Jupyter Notebook]]></title>
            <link>https://medium.com/@sishiliao/virtual-env-with-certain-python-version-for-running-jupyter-notebook-d1eb3fb53050?source=rss-1a23630b2615------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1eb3fb53050</guid>
            <category><![CDATA[virtual-environment]]></category>
            <category><![CDATA[anaconda]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[jupyter-notebook]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Sishi Liao]]></dc:creator>
            <pubDate>Wed, 29 May 2024 17:34:35 GMT</pubDate>
            <atom:updated>2024-05-30T18:40:59.006Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WvQfPo-m8T8TlmUN6eJLtw.png" /></figure><p>Python packages might depend on different Python versions.<br>This passage describes a set of procedures to run Jupyter Notebook with our desired Python version in a virtual environment on a Linux server.</p><h3>1. Implement Conda</h3><h4>1.1 Download Anaconda</h4><p><a href="https://www.anaconda.com/download/">Download</a> the correct version of Anaconda for your machine, <br>change dir to the home dir, and install it through this line: bash ./Downloads/Anaconda3-2024.02-1-Linux-x86_64.sh</p><h4>1.2 Add Conda to the system path</h4><p>We modify the .bashrc file here to configure the Conda to our system’s PATH: nano ~/.bashrc.<br>Then we add this line to the .bashrc file: export PATH=~/anaconda3/bin:$PATH.<br>To save the settings:source ~/.bashrc.</p><h3>2. Create, activate and link a virtualenv</h3><h4>2.1 Create a virtualenv with your desired version of Python</h4><p>Back to your home dir, let’s create a virtualenv named `myenv` with Python version 3.10.14, just by typing conda create -n myenv python=3.10.14.<br>- myenv: your virtualenv name<br>- 3.10.14: your Python version</p><h4>2.2 Activate your virtualenv</h4><p>Activate it so that the desired Python version is chosen: conda activate myenv.<br>- myenv: your virtualenv name</p><p>You should now see the virtualenv’s name from the command line, on the left of your username.<br>Let’s test if the Python version of this virtualenv is your preferred one: python --version.</p><h4>2.3 Link the new virtualenv with our Jupyter Notebook</h4><p>Install ipykernel module, and link the new virtualenv with our Jupyter Notebook by python -m pip install ipykernel.<br>Link the virtualenv myenv to our Jupyter Notebook, type python -m ipykernel install --user --name=myenv.<br>- myenv: your virtualenv name</p><h3>3. Start Jupyter Notebook</h3><p>Start your Jupyter Notebook session with a certain port number, through this line: jupyter notebook --no-browser --port=8080 <br>If you haven’t logged in in the same port number, activate the Jupyter Notebook link in another Terminal tab: ssh -L 8080:localhost:8080 user_name@your.domain.here <br>- user_name: your username<br>- your.domain.here: your server address</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1eb3fb53050" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>