<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jupyter &#8211; Be on the Right Side of Change</title>
	<atom:link href="https://blog.finxter.com/category/jupyter/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.finxter.com</link>
	<description></description>
	<lastBuildDate>Mon, 09 Oct 2023 10:43:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://blog.finxter.com/wp-content/uploads/2020/08/cropped-cropped-finxter_nobackground-32x32.png</url>
	<title>Jupyter &#8211; Be on the Right Side of Change</title>
	<link>https://blog.finxter.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>What&#8217;s the Default Google Colab Directory To Store Files?</title>
		<link>https://blog.finxter.com/whats-the-default-google-colab-directory-to-store-files/</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Mon, 09 Oct 2023 10:42:15 +0000</pubDate>
				<category><![CDATA[File Handling]]></category>
		<category><![CDATA[Input/Output]]></category>
		<category><![CDATA[Jupyter]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://blog.finxter.com/?p=1652085</guid>

					<description><![CDATA[I just spent 10 minutes looking for the file I had written in my Python script in Google Colab. 😅 💡 Google Colab is a popular platform for data scientists and machine learning enthusiasts. You can write and execute Python code in your browser! Let&#8217;s say you want to write to a file in your ... <a title="What&#8217;s the Default Google Colab Directory To Store Files?" class="read-more" href="https://blog.finxter.com/whats-the-default-google-colab-directory-to-store-files/" aria-label="Read more about What&#8217;s the Default Google Colab Directory To Store Files?">Read more</a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">I just spent 10 minutes looking for the file I had written in my Python script in Google Colab. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f605.png" alt="😅" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p class="has-base-2-background-color has-background wp-block-paragraph"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <a href="http://colab.research.google.com/">Google Colab</a> is a popular platform for data scientists and machine learning enthusiasts. You can write and execute Python code in your browser! </p>



<p class="wp-block-paragraph">Let&#8217;s say you want to write to a file in your Colab Notebook like this: <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">print('hello world', file=open('my_file.txt', 'w'))</pre>



<p class="wp-block-paragraph">Where&#8217;s the location of this file after running that cell?</p>



<p class="has-global-color-8-background-color has-background wp-block-paragraph"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f9d1-200d-1f4bb.png" alt="🧑‍💻" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Answer</strong>: By default, Google Colab starts in the <code>/content</code> directory. This is the root directory where you can perform various operations, similar to a locally hosted Jupyter Notebook. </p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img fetchpriority="high" decoding="async" width="1024" height="774" src="https://blog.finxter.com/wp-content/uploads/2023/10/image-51-1024x774.png" alt="" class="wp-image-1652087" srcset="https://blog.finxter.com/wp-content/uploads/2023/10/image-51-1024x774.png 1024w, https://blog.finxter.com/wp-content/uploads/2023/10/image-51-300x227.png 300w, https://blog.finxter.com/wp-content/uploads/2023/10/image-51-768x580.png 768w, https://blog.finxter.com/wp-content/uploads/2023/10/image-51-1536x1160.png 1536w, https://blog.finxter.com/wp-content/uploads/2023/10/image-51.png 1542w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p class="wp-block-paragraph">However, there may be instances where you need to change the directory, especially when you want to access files from different locations or save your work in a specific folder.</p>



<h2 class="wp-block-heading">How to Change The Directory in Colab?</h2>



<p class="has-global-color-8-background-color has-background wp-block-paragraph">To change the directory in Google Colab, you can use the <code>%cd</code> command followed by the path of the directory you want to switch to. For example, if you have a folder named <code>'MyCoolFolder'</code> in your current directory, you can change to this directory by typing <code>%cd MyCoolFolder</code> in a code cell and running it. </p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img decoding="async" width="1024" height="244" src="https://blog.finxter.com/wp-content/uploads/2023/10/image-52-1024x244.png" alt="" class="wp-image-1652088" srcset="https://blog.finxter.com/wp-content/uploads/2023/10/image-52-1024x244.png 1024w, https://blog.finxter.com/wp-content/uploads/2023/10/image-52-300x72.png 300w, https://blog.finxter.com/wp-content/uploads/2023/10/image-52-768x183.png 768w, https://blog.finxter.com/wp-content/uploads/2023/10/image-52-1536x367.png 1536w, https://blog.finxter.com/wp-content/uploads/2023/10/image-52.png 1538w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p class="wp-block-paragraph">This command changes the current working directory for the notebook environment, not just the subshell running the command.</p>



<p class="wp-block-paragraph">However, if you want to change the directory from Google Colab into Google Drive, you need to connect to Google Drive first. This is because Google Colab and Google Drive are separate services, and you need to establish a connection between them before you can access files from Google Drive in Google Colab. To do this, you can use the following code:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">from google.colab import drive
drive.mount('/content/drive')</pre>



<p class="wp-block-paragraph">After running this code, you will be asked to authorize the connection by signing in to your Google account and copying the authorization code into the input box in Colab. </p>



<p class="wp-block-paragraph">Once the connection is established, you can change the directory to a specific folder in your Google Drive by using the <code>%cd</code> command followed by the path of the folder in Google Drive. For example:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">%cd /content/drive/MyDrive/YourFolder</pre>



<p class="wp-block-paragraph">By default, the path in Google Colab is the root directory. However, depending on your needs, you can change the path to any other directory. This is useful when working on a project involving multiple files stored in different folders. Changing the path allows you to easily access and manipulate these files without moving them to the same folder.</p>



<p class="has-base-2-background-color has-background wp-block-paragraph"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Recommended</strong>: <a href="https://blog.finxter.com/how-i-built-a-back-link-checker-using-chatgpt-and-google-colab/">How I Built a Back-Link Checker Using ChatGPT and Google Colab</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>This is How I Played a Sinus Tone in My Jupyter Notebook (Python)</title>
		<link>https://blog.finxter.com/play-tone-jupyter/</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Sun, 18 Dec 2022 14:31:26 +0000</pubDate>
				<category><![CDATA[Jupyter]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<guid isPermaLink="false">https://blog.finxter.com/?p=985736</guid>

					<description><![CDATA[What/Why? I want to write a simple Python script that warns me if crypto price data (e.g., BTC) crosses a certain threshold. This can be useful for trading or some other apps, so I thought it would be fun to do it. The tutorial in front of you simply documents my learnings on creating a ... <a title="This is How I Played a Sinus Tone in My Jupyter Notebook (Python)" class="read-more" href="https://blog.finxter.com/play-tone-jupyter/" aria-label="Read more about This is How I Played a Sinus Tone in My Jupyter Notebook (Python)">Read more</a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>What/Why?</strong> I want to write a simple Python script that warns me if crypto price data (e.g., BTC) crosses a certain threshold. This can be useful for trading or some other apps, so I thought it would be fun to do it. </p>



<p class="wp-block-paragraph">The tutorial in front of you simply documents my learnings on creating a sinus tone in my Jupyter Notebook&#8212;so it may benefit you as well. </p>



<p class="wp-block-paragraph">If you want the whole tutorial on my mini project, you can check it out here on the Finxter blog: </p>



<p class="has-base-background-color has-background wp-block-paragraph"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Recommended Tutorial</strong>: <a href="https://blog.finxter.com/how-i-created-a-python-script-that-warns-me-if-bitcoin-or-eth-price-is-above-a-certain-value/" data-type="post" data-id="985731" target="_blank" rel="noreferrer noopener">I Made a Python Script That Beeps When BTC or ETH Prices Drop</a></p>



<figure class="wp-block-image size-full"><img decoding="async" width="1002" height="668" src="https://blog.finxter.com/wp-content/uploads/2022/12/image-250.png" alt="" class="wp-image-987266" srcset="https://blog.finxter.com/wp-content/uploads/2022/12/image-250.png 1002w, https://blog.finxter.com/wp-content/uploads/2022/12/image-250-300x200.png 300w, https://blog.finxter.com/wp-content/uploads/2022/12/image-250-768x512.png 768w" sizes="(max-width: 1002px) 100vw, 1002px" /></figure>



<h2 class="wp-block-heading">Challenge</h2>



<p class="has-global-color-8-background-color has-background wp-block-paragraph"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4ac.png" alt="💬" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Challenge</strong>: Write Python code in a Jupyter Notebook that creates a sinus tone when executed. </p>



<h2 class="wp-block-heading">Solution</h2>



<p class="wp-block-paragraph">The easy way to solve this challenge is the following. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<p class="has-base-background-color has-background wp-block-paragraph">This code creates a sine wave with a frequency of 500 Hz and plays it in the IPython environment. The wave is created using the NumPy library by specifying the frequency and the length of the wave (15000*2). The rate of the wave is set to 10000 Hz and autoplay is set to <code>True</code> so that the wave will start playing immediately.</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import numpy as np
from IPython.display import Audio

# Create the tone as a NumPy Sinus Wave
wave = np.sin(2*np.pi*500*np.arange(15000*2)/15000)

# Play the Sinus Wave (tone)
Audio(wave, rate=10000, autoplay=True)</pre>



<p class="wp-block-paragraph">This generates the following beep sound in your Jupyter Notebook:</p>



<figure class="wp-block-audio"><audio controls src="https://blog.finxter.com/wp-content/uploads/2022/12/peep.mp3"></audio></figure>



<p class="wp-block-paragraph">What happens if you change the <code>rate</code> argument of the <code>Audio()</code> function call to be 20000 instead of 10000?</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="2" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># Play the Sinus Wave (tone)
Audio(wave, rate=20000, autoplay=True)</pre>



<p class="wp-block-paragraph">The beep sound tone gets higher:</p>



<figure class="wp-block-audio"><audio controls src="https://blog.finxter.com/wp-content/uploads/2022/12/beep_20000.mp3"></audio></figure>



<p class="wp-block-paragraph">You can play around with the Jupyter notebook here:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://colab.research.google.com/drive/1Kd4G_9sn6EFy7lZLLUYBsUQh7DXz-SSG?usp=sharing" target="_blank" rel="noreferrer noopener"><img loading="lazy" decoding="async" width="720" height="382" src="https://blog.finxter.com/wp-content/uploads/2022/12/image-248.png" alt="" class="wp-image-987259" srcset="https://blog.finxter.com/wp-content/uploads/2022/12/image-248.png 720w, https://blog.finxter.com/wp-content/uploads/2022/12/image-248-300x159.png 300w" sizes="auto, (max-width: 720px) 100vw, 720px" /></a></figure>
</div>


<p class="wp-block-paragraph">But what if you don&#8217;t have a Jupyter notebook but a normal Python script (Win/Linux/macOS)?</p>



<p class="wp-block-paragraph">In that case, you cannot use the <code>IPython</code> library. Instead, follow the steps outlined in the following tutorial on the Finxter blog&#8212;you still can play beep sounds!</p>



<p class="has-base-background-color has-background wp-block-paragraph"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f449.png" alt="👉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Recommended Tutorial</strong>: <a href="https://blog.finxter.com/how-to-make-a-beep-sound-in-python-linux-macos-win/" data-type="post" data-id="147986" target="_blank" rel="noreferrer noopener">How to Make a Beep Sound in Python?</a></p>



<h2 class="wp-block-heading">Thanks for Reading! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2665.png" alt="♥" class="wp-smiley" style="height: 1em; max-height: 1em;" /> </h2>



<p class="wp-block-paragraph">You&#8217;re welcome to join our free email academy where I share all our coding projects and cheat sheets on a weekly basis:</p>



]]></content:encoded>
					
		
		<enclosure url="https://blog.finxter.com/wp-content/uploads/2022/12/peep.mp3" length="74299" type="audio/mpeg" />
<enclosure url="https://blog.finxter.com/wp-content/uploads/2022/12/beep_20000.mp3" length="125631" type="audio/mpeg" />

			</item>
		<item>
		<title>How to Check Python Version in Colab?</title>
		<link>https://blog.finxter.com/how-to-check-python-version-in-colab/</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Mon, 19 Sep 2022 14:14:31 +0000</pubDate>
				<category><![CDATA[Dependency Management]]></category>
		<category><![CDATA[Jupyter]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://blog.finxter.com/?p=693250</guid>

					<description><![CDATA[To check your Python version in Google&#8217;s Colab, type !python ‐‐version using the exclamation mark ! operator in your Jupyter Notebook cell and click on the &#8220;Run&#8221; icon. After a couple of seconds an output like Python 3.9 will appear, depending on the version you&#8217;ve installed. In Jupyter notebooks, the exclamation mark ! executes commands ... <a title="How to Check Python Version in Colab?" class="read-more" href="https://blog.finxter.com/how-to-check-python-version-in-colab/" aria-label="Read more about How to Check Python Version in Colab?">Read more</a>]]></description>
										<content:encoded><![CDATA[
<p class="has-global-color-8-background-color has-background wp-block-paragraph">To check your Python version in Google&#8217;s Colab, type <code>!python ‐‐version</code> using the <a rel="noreferrer noopener" href="https://blog.finxter.com/whats-the-meaning-of-the-exclamation-mark-in-a-jupyter-notebook/" data-type="post" data-id="34817" target="_blank">exclamation mark <code>!</code> operator</a> in your Jupyter Notebook cell and click on the &#8220;Run&#8221; icon. After a couple of seconds an output like Python 3.9 will appear, depending on the version you&#8217;ve installed.</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="705" height="486" src="https://blog.finxter.com/wp-content/uploads/2022/09/checkpythonversioncolab.gif" alt="" class="wp-image-694096"/></figure>
</div>


<p class="wp-block-paragraph">In Jupyter notebooks, the exclamation mark <code>!</code> executes commands from the underlying operating system.</p>



<p class="has-base-background-color has-background wp-block-paragraph"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Recommended Tutorial</strong>: <a href="https://blog.finxter.com/whats-the-meaning-of-the-exclamation-mark-in-a-jupyter-notebook/" data-type="post" data-id="34817">What’s the Meaning of the Exclamation Mark in a Jupyter Notebook?</a></p>



<p class="wp-block-paragraph">Feel free to <strong>try it yourself</strong> in our Colab Jupyter Notebook created for this tutorial:</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://colab.research.google.com/drive/1xvy8dNaDu8U1o3n75sqBA4GL6b33pREE?usp=sharing" target="_blank" rel="noreferrer noopener"><img loading="lazy" decoding="async" width="594" height="101" src="https://blog.finxter.com/wp-content/uploads/2022/09/image-62.png" alt="" class="wp-image-693994" srcset="https://blog.finxter.com/wp-content/uploads/2022/09/image-62.png 594w, https://blog.finxter.com/wp-content/uploads/2022/09/image-62-300x51.png 300w" sizes="auto, (max-width: 594px) 100vw, 594px" /></a><figcaption>Click to run code in Colab Jupyter Notebook</figcaption></figure>
</div>


<p class="wp-block-paragraph">By the way, there are some alternatives to checking your Python version in your script. I&#8217;d recommend you check out our <a href="https://blog.finxter.com/check-python-version-in-your-script-a-helpful-illustrated-guide/" data-type="post" data-id="9010" target="_blank" rel="noreferrer noopener">deep dive</a> on the Finxter blog as well. </p>



<p class="wp-block-paragraph">For example, the following approach using the <code>sys</code> library can also help you check out the version of your Python in Colab:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import sys
print(sys.version)</pre>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="587" height="157" src="https://blog.finxter.com/wp-content/uploads/2022/09/image-63.png" alt="" class="wp-image-694126" srcset="https://blog.finxter.com/wp-content/uploads/2022/09/image-63.png 587w, https://blog.finxter.com/wp-content/uploads/2022/09/image-63-300x80.png 300w" sizes="auto, (max-width: 587px) 100vw, 587px" /></figure>
</div>


<p class="wp-block-paragraph"><strong>Summary</strong>: To check the Python version in your Jupyter Colab Notebook, do any of the following:</p>



<ul class="wp-block-list"><li><code>!python ‐‐version</code></li><li><code>import sys; print(sys.version)</code></li></ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph">Thanks for reading the whole article, feel free to join our community of like-minded and ambitious coders &#8212; and download our <a href="https://blog.finxter.com/subscribe/" data-type="page" data-id="1414">Python c</a><a href="https://blog.finxter.com/subscribe/" data-type="page" data-id="1414" target="_blank" rel="noreferrer noopener">h</a><a href="https://blog.finxter.com/subscribe/" data-type="page" data-id="1414">eat sheets</a>!</p>



]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Install httplib2 in Python?</title>
		<link>https://blog.finxter.com/how-to-install-httplib2-in-python/</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Wed, 06 Jul 2022 14:50:09 +0000</pubDate>
				<category><![CDATA[Dependency Management]]></category>
		<category><![CDATA[Jupyter]]></category>
		<category><![CDATA[pip]]></category>
		<category><![CDATA[PyCharm]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<guid isPermaLink="false">https://blog.finxter.com/?p=457069</guid>

					<description><![CDATA[The Python httplib2 library is among the top 100 Python libraries, with more than 30,185,494 downloads. This article will show you everything you need to get this installed in your Python environment. Library Link How to Install httplib2 on Windows? Type "cmd" in the search bar and hit Enter to open the command line. Type ... <a title="How to Install httplib2 in Python?" class="read-more" href="https://blog.finxter.com/how-to-install-httplib2-in-python/" aria-label="Read more about How to Install httplib2 in Python?">Read more</a>]]></description>
										<content:encoded><![CDATA[
<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install httplib2</pre>



<p class="wp-block-paragraph">The Python <strong>httplib2 </strong>library is among the top 100 Python libraries, with more than <strong>30,185,494</strong> downloads. This article will show you everything you need to get this installed in your Python environment.</p>



<ul class="wp-block-list"><li><a href="https://pypi.org/project/httplib2" target="_blank" rel="noreferrer noopener" title="https://pypi.org/project/httplib2">Library Link</a></li></ul>



<h2 class="wp-block-heading">How to Install httplib2 on Windows?</h2>



<ol class="wp-block-list"><li>Type <code>"cmd"</code> in the search bar and hit <code>Enter</code> to open the command line.</li><li>Type &#8220;<code>pip install httplib2</code>&#8221; (without quotes) in the command line and hit <code>Enter</code> again. This installs httplib2 for your default Python installation.</li><li>The previous command may not work if you have both Python versions 2 and 3 on your computer. In this case, try <code>"pip3 install httplib2"</code> or &#8220;<code>python -m pip install httplib2</code>&#8220;.</li><li>Wait for the installation to terminate successfully. It is now installed on your Windows machine.</li></ol>



<p class="wp-block-paragraph">Here&#8217;s how to open the command line on a (German) Windows machine:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="986" height="852" src="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png" alt="Open CMD in Windows" class="wp-image-35703" srcset="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png 986w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-300x259.png 300w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-768x664.png 768w" sizes="auto, (max-width: 986px) 100vw, 986px" /></figure>



<p class="wp-block-paragraph">First, try the following command to install <strong>httplib2</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install httplib2</pre>



<p class="wp-block-paragraph">Second, if this leads to an error message, try this command to install <strong>httplib2</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip3 install httplib2</pre>



<p class="wp-block-paragraph">Third, if both do not work, use the following long-form command:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python -m pip install httplib2</pre>



<p class="wp-block-paragraph">The difference between <code>pip</code> and <code>pip3</code> is that <code>pip3</code> is an updated version of <code>pip</code> for Python <a href="https://blog.finxter.com/how-to-check-your-python-version/" target="_blank" rel="noreferrer noopener" title="HOW TO CHECK YOUR PYTHON VERSION">version </a>3. Depending on what&#8217;s first in the <code>PATH</code> variable, <code>pip</code> will refer to your Python 2 or Python 3 installation&#8212;and you cannot know which without checking the environment variables. To resolve this uncertainty, you can use <code>pip3</code>, which will always refer to your default Python 3 installation.</p>



<h2 class="wp-block-heading">How to Install httplib2 on Linux?</h2>



<p class="wp-block-paragraph">You can install httplib2 on Linux in four steps:</p>



<ol class="wp-block-list"><li>Open your Linux terminal or shell</li><li>Type &#8220;<code>pip install httplib2</code>&#8221; (without quotes), hit Enter.</li><li>If it doesn&#8217;t work, try <code>"pip3 install httplib2"</code> or &#8220;<code>python -m pip install httplib2</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your Linux operating system.</p>



<h2 class="wp-block-heading">How to Install httplib2 on macOS?</h2>



<p class="wp-block-paragraph">Similarly, you can install httplib2 on macOS in four steps:</p>



<ol class="wp-block-list"><li>Open your macOS terminal.</li><li>Type &#8220;<code>pip install httplib2</code>&#8221; without quotes and hit <code>Enter</code>.</li><li>If it doesn&#8217;t work, try <code>"pip3 install httplib2"</code> or &#8220;<code>python -m pip install httplib2</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your macOS.</p>



<h2 class="wp-block-heading">How to Install httplib2 in PyCharm?</h2>



<p class="wp-block-paragraph">Given a <a href="https://blog.finxter.com/pycharm-a-simple-illustrated-guide/" target="_blank" rel="noreferrer noopener">PyCharm </a>project. How to install the httplib2 library in your project within a <a href="https://blog.finxter.com/python-virtual-environments-with-venv-a-step-by-step-guide/" target="_blank" rel="noreferrer noopener">virtual environment</a> or globally? Here’s a <a href="https://blog.finxter.com/how-to-install-a-library-on-pycharm/" target="_blank" rel="noreferrer noopener">solution </a>that always works:</p>



<ul class="wp-block-list"><li>Open <code><strong>File &gt; Settings &gt; Project</strong></code> from the PyCharm menu.</li><li>Select your current project.</li><li>Click the <code><strong>Python Interpreter</strong></code> tab within your project tab.</li><li>Click the small <code><strong>+</strong></code> symbol to add a new library to the project.</li><li>Now type in the library to be installed, in your example <code>"httplib2"</code> without quotes, and click <code><strong>Install Package</strong></code>.</li><li>Wait for the installation to terminate and close all pop-ups.</li></ul>



<p class="wp-block-paragraph">Here’s the general package installation process as a short animated video—it works analogously for httplib2 if you type in <em>&#8220;httplib2&#8221;</em> in the search field instead:</p>



<figure class="wp-block-image"><img decoding="async" src="https://media.giphy.com/media/VQoZIvOyP23tVvQlW0/source.gif" alt=""/></figure>



<p class="wp-block-paragraph">Make sure to select only <em>&#8220;httplib2&#8221; </em>because there may be other packages that are not required but also contain the same term (<em>false positives</em>):</p>



<h2 class="wp-block-heading">How to Install httplib2 in a Jupyter Notebook?</h2>



<p class="wp-block-paragraph">To install any package in a Jupyter notebook, you can prefix the <code>!pip install my_package</code> statement with the exclamation mark <code>"!"</code>. This works for the httplib2 library too:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">!pip install my_package</pre>



<p class="wp-block-paragraph">This automatically installs the httplib2 library when the cell is first executed.</p>



<h2 class="wp-block-heading">How to Resolve ModuleNotFoundError: No module named &#8216;httplib2&#8217;?</h2>



<p class="wp-block-paragraph">Say you try to import the httplib2 package into your Python script without installing it first:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import httplib2
# ... ModuleNotFoundError: No module named 'httplib2'</pre>



<p class="wp-block-paragraph">Because you haven&#8217;t installed the package, Python raises a <code>ModuleNotFoundError: No module named 'httplib2'</code>. </p>



<p class="wp-block-paragraph">To fix the error, install the httplib2 library using &#8220;<code>pip install httplib2</code>&#8221; or &#8220;<code>pip3 install httplib2</code>&#8221; in your operating system&#8217;s shell or terminal first. </p>



<p class="wp-block-paragraph">See above for the different ways to install httplib2 in your environment.</p>



<h2 class="wp-block-heading">Improve Your Python Skills</h2>



<p class="wp-block-paragraph">If you want to keep improving your Python skills and learn about new and exciting technologies such as Blockchain development, machine learning, and data science, check out the Finxter <a href="https://blog.finxter.com/email-academy/" title="Email Academy" target="_blank" rel="noreferrer noopener">free email academy</a> with cheat sheets, regular tutorials, and programming puzzles.</p>






<p class="wp-block-paragraph">Join us, it&#8217;s fun! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Install pynacl in Python?</title>
		<link>https://blog.finxter.com/how-to-install-pynacl-in-python/</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Wed, 06 Jul 2022 14:46:03 +0000</pubDate>
				<category><![CDATA[Dependency Management]]></category>
		<category><![CDATA[Jupyter]]></category>
		<category><![CDATA[pip]]></category>
		<category><![CDATA[PyCharm]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<guid isPermaLink="false">https://blog.finxter.com/?p=457070</guid>

					<description><![CDATA[The Python pynacl library is among the top 100 Python libraries, with more than 29,873,630 downloads. This article will show you everything you need to get this installed in your Python environment. Library Link How to Install pynacl on Windows? Type "cmd" in the search bar and hit Enter to open the command line. Type ... <a title="How to Install pynacl in Python?" class="read-more" href="https://blog.finxter.com/how-to-install-pynacl-in-python/" aria-label="Read more about How to Install pynacl in Python?">Read more</a>]]></description>
										<content:encoded><![CDATA[
<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install pynacl</pre>



<p class="wp-block-paragraph">The Python <strong>pynacl </strong>library is among the top 100 Python libraries, with more than <strong>29,873,630</strong> downloads. This article will show you everything you need to get this installed in your Python environment.</p>



<ul class="wp-block-list"><li><a href="https://pypi.org/project/pynacl" target="_blank" rel="noreferrer noopener" title="https://pypi.org/project/pynacl">Library Link</a></li></ul>



<h2 class="wp-block-heading">How to Install pynacl on Windows?</h2>



<ol class="wp-block-list"><li>Type <code>"cmd"</code> in the search bar and hit <code>Enter</code> to open the command line.</li><li>Type &#8220;<code>pip install pynacl</code>&#8221; (without quotes) in the command line and hit <code>Enter</code> again. This installs pynacl for your default Python installation.</li><li>The previous command may not work if you have both Python versions 2 and 3 on your computer. In this case, try <code>"pip3 install pynacl"</code> or &#8220;<code>python -m pip install pynacl</code>&#8220;.</li><li>Wait for the installation to terminate successfully. It is now installed on your Windows machine.</li></ol>



<p class="wp-block-paragraph">Here&#8217;s how to open the command line on a (German) Windows machine:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="986" height="852" src="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png" alt="Open CMD in Windows" class="wp-image-35703" srcset="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png 986w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-300x259.png 300w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-768x664.png 768w" sizes="auto, (max-width: 986px) 100vw, 986px" /></figure>



<p class="wp-block-paragraph">First, try the following command to install <strong>pynacl</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install pynacl</pre>



<p class="wp-block-paragraph">Second, if this leads to an error message, try this command to install <strong>pynacl</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip3 install pynacl</pre>



<p class="wp-block-paragraph">Third, if both do not work, use the following long-form command:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python -m pip install pynacl</pre>



<p class="wp-block-paragraph">The difference between <code>pip</code> and <code>pip3</code> is that <code>pip3</code> is an updated version of <code>pip</code> for Python <a href="https://blog.finxter.com/how-to-check-your-python-version/" target="_blank" rel="noreferrer noopener" title="HOW TO CHECK YOUR PYTHON VERSION">version </a>3. Depending on what&#8217;s first in the <code>PATH</code> variable, <code>pip</code> will refer to your Python 2 or Python 3 installation&#8212;and you cannot know which without checking the environment variables. To resolve this uncertainty, you can use <code>pip3</code>, which will always refer to your default Python 3 installation.</p>



<h2 class="wp-block-heading">How to Install pynacl on Linux?</h2>



<p class="wp-block-paragraph">You can install pynacl on Linux in four steps:</p>



<ol class="wp-block-list"><li>Open your Linux terminal or shell</li><li>Type &#8220;<code>pip install pynacl</code>&#8221; (without quotes), hit Enter.</li><li>If it doesn&#8217;t work, try <code>"pip3 install pynacl"</code> or &#8220;<code>python -m pip install pynacl</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your Linux operating system.</p>



<h2 class="wp-block-heading">How to Install pynacl on macOS?</h2>



<p class="wp-block-paragraph">Similarly, you can install pynacl on macOS in four steps:</p>



<ol class="wp-block-list"><li>Open your macOS terminal.</li><li>Type &#8220;<code>pip install pynacl</code>&#8221; without quotes and hit <code>Enter</code>.</li><li>If it doesn&#8217;t work, try <code>"pip3 install pynacl"</code> or &#8220;<code>python -m pip install pynacl</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your macOS.</p>



<h2 class="wp-block-heading">How to Install pynacl in PyCharm?</h2>



<p class="wp-block-paragraph">Given a <a href="https://blog.finxter.com/pycharm-a-simple-illustrated-guide/" target="_blank" rel="noreferrer noopener">PyCharm </a>project. How to install the pynacl library in your project within a <a href="https://blog.finxter.com/python-virtual-environments-with-venv-a-step-by-step-guide/" target="_blank" rel="noreferrer noopener">virtual environment</a> or globally? Here’s a <a href="https://blog.finxter.com/how-to-install-a-library-on-pycharm/" target="_blank" rel="noreferrer noopener">solution </a>that always works:</p>



<ul class="wp-block-list"><li>Open <code><strong>File &gt; Settings &gt; Project</strong></code> from the PyCharm menu.</li><li>Select your current project.</li><li>Click the <code><strong>Python Interpreter</strong></code> tab within your project tab.</li><li>Click the small <code><strong>+</strong></code> symbol to add a new library to the project.</li><li>Now type in the library to be installed, in your example <code>"pynacl"</code> without quotes, and click <code><strong>Install Package</strong></code>.</li><li>Wait for the installation to terminate and close all pop-ups.</li></ul>



<p class="wp-block-paragraph">Here’s the general package installation process as a short animated video—it works analogously for pynacl if you type in <em>&#8220;pynacl&#8221;</em> in the search field instead:</p>



<figure class="wp-block-image"><img decoding="async" src="https://media.giphy.com/media/VQoZIvOyP23tVvQlW0/source.gif" alt=""/></figure>



<p class="wp-block-paragraph">Make sure to select only <em>&#8220;pynacl&#8221; </em>because there may be other packages that are not required but also contain the same term (<em>false positives</em>):</p>



<h2 class="wp-block-heading">How to Install pynacl in a Jupyter Notebook?</h2>



<p class="wp-block-paragraph">To install any package in a Jupyter notebook, you can prefix the <code>!pip install my_package</code> statement with the exclamation mark <code>"!"</code>. This works for the pynacl library too:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">!pip install my_package</pre>



<p class="wp-block-paragraph">This automatically installs the pynacl library when the cell is first executed.</p>



<h2 class="wp-block-heading">How to Resolve ModuleNotFoundError: No module named &#8216;pynacl&#8217;?</h2>



<p class="wp-block-paragraph">Say you try to import the pynacl package into your Python script without installing it first:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import pynacl
# ... ModuleNotFoundError: No module named 'pynacl'</pre>



<p class="wp-block-paragraph">Because you haven&#8217;t installed the package, Python raises a <code>ModuleNotFoundError: No module named 'pynacl'</code>. </p>



<p class="wp-block-paragraph">To fix the error, install the pynacl library using &#8220;<code>pip install pynacl</code>&#8221; or &#8220;<code>pip3 install pynacl</code>&#8221; in your operating system&#8217;s shell or terminal first. </p>



<p class="wp-block-paragraph">See above for the different ways to install pynacl in your environment.</p>



<h2 class="wp-block-heading">Improve Your Python Skills</h2>



<p class="wp-block-paragraph">If you want to keep improving your Python skills and learn about new and exciting technologies such as Blockchain development, machine learning, and data science, check out the Finxter <a href="https://blog.finxter.com/email-academy/" title="Email Academy" target="_blank" rel="noreferrer noopener">free email academy</a> with cheat sheets, regular tutorials, and programming puzzles.</p>






<p class="wp-block-paragraph">Join us, it&#8217;s fun! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Install virtualenv in Python?</title>
		<link>https://blog.finxter.com/how-to-install-virtualenv-in-python/</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Wed, 06 Jul 2022 14:45:42 +0000</pubDate>
				<category><![CDATA[Dependency Management]]></category>
		<category><![CDATA[Jupyter]]></category>
		<category><![CDATA[pip]]></category>
		<category><![CDATA[PyCharm]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<guid isPermaLink="false">https://blog.finxter.com/?p=457071</guid>

					<description><![CDATA[The Python virtualenv library is among the top 100 Python libraries, with more than 27,848,614 downloads. This article will show you everything you need to get this installed in your Python environment. Library Link How to Install virtualenv on Windows? Type "cmd" in the search bar and hit Enter to open the command line. Type ... <a title="How to Install virtualenv in Python?" class="read-more" href="https://blog.finxter.com/how-to-install-virtualenv-in-python/" aria-label="Read more about How to Install virtualenv in Python?">Read more</a>]]></description>
										<content:encoded><![CDATA[
<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install virtualenv</pre>



<p class="wp-block-paragraph">The Python <strong>virtualenv </strong>library is among the top 100 Python libraries, with more than <strong>27,848,614</strong> downloads. This article will show you everything you need to get this installed in your Python environment.</p>



<ul class="wp-block-list"><li><a href="https://pypi.org/project/virtualenv" target="_blank" rel="noreferrer noopener" title="https://pypi.org/project/virtualenv">Library Link</a></li></ul>



<h2 class="wp-block-heading">How to Install virtualenv on Windows?</h2>



<ol class="wp-block-list"><li>Type <code>"cmd"</code> in the search bar and hit <code>Enter</code> to open the command line.</li><li>Type &#8220;<code>pip install virtualenv</code>&#8221; (without quotes) in the command line and hit <code>Enter</code> again. This installs virtualenv for your default Python installation.</li><li>The previous command may not work if you have both Python versions 2 and 3 on your computer. In this case, try <code>"pip3 install virtualenv"</code> or &#8220;<code>python -m pip install virtualenv</code>&#8220;.</li><li>Wait for the installation to terminate successfully. It is now installed on your Windows machine.</li></ol>



<p class="wp-block-paragraph">Here&#8217;s how to open the command line on a (German) Windows machine:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="986" height="852" src="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png" alt="Open CMD in Windows" class="wp-image-35703" srcset="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png 986w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-300x259.png 300w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-768x664.png 768w" sizes="auto, (max-width: 986px) 100vw, 986px" /></figure>



<p class="wp-block-paragraph">First, try the following command to install <strong>virtualenv</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install virtualenv</pre>



<p class="wp-block-paragraph">Second, if this leads to an error message, try this command to install <strong>virtualenv</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip3 install virtualenv</pre>



<p class="wp-block-paragraph">Third, if both do not work, use the following long-form command:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python -m pip install virtualenv</pre>



<p class="wp-block-paragraph">The difference between <code>pip</code> and <code>pip3</code> is that <code>pip3</code> is an updated version of <code>pip</code> for Python <a href="https://blog.finxter.com/how-to-check-your-python-version/" target="_blank" rel="noreferrer noopener" title="HOW TO CHECK YOUR PYTHON VERSION">version </a>3. Depending on what&#8217;s first in the <code>PATH</code> variable, <code>pip</code> will refer to your Python 2 or Python 3 installation&#8212;and you cannot know which without checking the environment variables. To resolve this uncertainty, you can use <code>pip3</code>, which will always refer to your default Python 3 installation.</p>



<h2 class="wp-block-heading">How to Install virtualenv on Linux?</h2>



<p class="wp-block-paragraph">You can install virtualenv on Linux in four steps:</p>



<ol class="wp-block-list"><li>Open your Linux terminal or shell</li><li>Type &#8220;<code>pip install virtualenv</code>&#8221; (without quotes), hit Enter.</li><li>If it doesn&#8217;t work, try <code>"pip3 install virtualenv"</code> or &#8220;<code>python -m pip install virtualenv</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your Linux operating system.</p>



<h2 class="wp-block-heading">How to Install virtualenv on macOS?</h2>



<p class="wp-block-paragraph">Similarly, you can install virtualenv on macOS in four steps:</p>



<ol class="wp-block-list"><li>Open your macOS terminal.</li><li>Type &#8220;<code>pip install virtualenv</code>&#8221; without quotes and hit <code>Enter</code>.</li><li>If it doesn&#8217;t work, try <code>"pip3 install virtualenv"</code> or &#8220;<code>python -m pip install virtualenv</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your macOS.</p>



<h2 class="wp-block-heading">How to Install virtualenv in PyCharm?</h2>



<p class="wp-block-paragraph">Given a <a href="https://blog.finxter.com/pycharm-a-simple-illustrated-guide/" target="_blank" rel="noreferrer noopener">PyCharm </a>project. How to install the virtualenv library in your project within a <a href="https://blog.finxter.com/python-virtual-environments-with-venv-a-step-by-step-guide/" target="_blank" rel="noreferrer noopener">virtual environment</a> or globally? Here’s a <a href="https://blog.finxter.com/how-to-install-a-library-on-pycharm/" target="_blank" rel="noreferrer noopener">solution </a>that always works:</p>



<ul class="wp-block-list"><li>Open <code><strong>File &gt; Settings &gt; Project</strong></code> from the PyCharm menu.</li><li>Select your current project.</li><li>Click the <code><strong>Python Interpreter</strong></code> tab within your project tab.</li><li>Click the small <code><strong>+</strong></code> symbol to add a new library to the project.</li><li>Now type in the library to be installed, in your example <code>"virtualenv"</code> without quotes, and click <code><strong>Install Package</strong></code>.</li><li>Wait for the installation to terminate and close all pop-ups.</li></ul>



<p class="wp-block-paragraph">Here’s the general package installation process as a short animated video—it works analogously for virtualenv if you type in <em>&#8220;virtualenv&#8221;</em> in the search field instead:</p>



<figure class="wp-block-image"><img decoding="async" src="https://media.giphy.com/media/VQoZIvOyP23tVvQlW0/source.gif" alt=""/></figure>



<p class="wp-block-paragraph">Make sure to select only <em>&#8220;virtualenv&#8221; </em>because there may be other packages that are not required but also contain the same term (<em>false positives</em>):</p>



<h2 class="wp-block-heading">How to Install virtualenv in a Jupyter Notebook?</h2>



<p class="wp-block-paragraph">To install any package in a Jupyter notebook, you can prefix the <code>!pip install my_package</code> statement with the exclamation mark <code>"!"</code>. This works for the virtualenv library too:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">!pip install my_package</pre>



<p class="wp-block-paragraph">This automatically installs the virtualenv library when the cell is first executed.</p>



<h2 class="wp-block-heading">How to Resolve ModuleNotFoundError: No module named &#8216;virtualenv&#8217;?</h2>



<p class="wp-block-paragraph">Say you try to import the virtualenv package into your Python script without installing it first:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import virtualenv
# ... ModuleNotFoundError: No module named 'virtualenv'</pre>



<p class="wp-block-paragraph">Because you haven&#8217;t installed the package, Python raises a <code>ModuleNotFoundError: No module named 'virtualenv'</code>. </p>



<p class="wp-block-paragraph">To fix the error, install the virtualenv library using &#8220;<code>pip install virtualenv</code>&#8221; or &#8220;<code>pip3 install virtualenv</code>&#8221; in your operating system&#8217;s shell or terminal first. </p>



<p class="wp-block-paragraph">See above for the different ways to install virtualenv in your environment.</p>



<h2 class="wp-block-heading">Improve Your Python Skills</h2>



<p class="wp-block-paragraph">If you want to keep improving your Python skills and learn about new and exciting technologies such as Blockchain development, machine learning, and data science, check out the Finxter <a href="https://blog.finxter.com/email-academy/" title="Email Academy" target="_blank" rel="noreferrer noopener">free email academy</a> with cheat sheets, regular tutorials, and programming puzzles.</p>






<p class="wp-block-paragraph">Join us, it&#8217;s fun! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Install requests-toolbelt in Python?</title>
		<link>https://blog.finxter.com/how-to-install-requests-toolbelt-in-python/</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Wed, 06 Jul 2022 14:42:47 +0000</pubDate>
				<category><![CDATA[Dependency Management]]></category>
		<category><![CDATA[Jupyter]]></category>
		<category><![CDATA[pip]]></category>
		<category><![CDATA[PyCharm]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<guid isPermaLink="false">https://blog.finxter.com/?p=457072</guid>

					<description><![CDATA[The Python requests-toolbelt library is among the top 100 Python libraries, with more than 27,892,021 downloads. This article will show you everything you need to get this installed in your Python environment. Library Link How to Install requests-toolbelt on Windows? Type "cmd" in the search bar and hit Enter to open the command line. Type ... <a title="How to Install requests-toolbelt in Python?" class="read-more" href="https://blog.finxter.com/how-to-install-requests-toolbelt-in-python/" aria-label="Read more about How to Install requests-toolbelt in Python?">Read more</a>]]></description>
										<content:encoded><![CDATA[
<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install requests-toolbelt</pre>



<p class="wp-block-paragraph">The Python <strong>requests-toolbelt </strong>library is among the top 100 Python libraries, with more than <strong>27,892,021</strong> downloads. This article will show you everything you need to get this installed in your Python environment.</p>



<ul class="wp-block-list"><li><a href="https://pypi.org/project/requests-toolbelt" target="_blank" rel="noreferrer noopener" title="https://pypi.org/project/requests-toolbelt">Library Link</a></li></ul>



<h2 class="wp-block-heading">How to Install requests-toolbelt on Windows?</h2>



<ol class="wp-block-list"><li>Type <code>"cmd"</code> in the search bar and hit <code>Enter</code> to open the command line.</li><li>Type &#8220;<code>pip install requests-toolbelt</code>&#8221; (without quotes) in the command line and hit <code>Enter</code> again. This installs requests-toolbelt for your default Python installation.</li><li>The previous command may not work if you have both Python versions 2 and 3 on your computer. In this case, try <code>"pip3 install requests-toolbelt"</code> or &#8220;<code>python -m pip install requests-toolbelt</code>&#8220;.</li><li>Wait for the installation to terminate successfully. It is now installed on your Windows machine.</li></ol>



<p class="wp-block-paragraph">Here&#8217;s how to open the command line on a (German) Windows machine:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="986" height="852" src="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png" alt="Open CMD in Windows" class="wp-image-35703" srcset="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png 986w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-300x259.png 300w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-768x664.png 768w" sizes="auto, (max-width: 986px) 100vw, 986px" /></figure>



<p class="wp-block-paragraph">First, try the following command to install <strong>requests-toolbelt</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install requests-toolbelt</pre>



<p class="wp-block-paragraph">Second, if this leads to an error message, try this command to install <strong>requests-toolbelt</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip3 install requests-toolbelt</pre>



<p class="wp-block-paragraph">Third, if both do not work, use the following long-form command:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python -m pip install requests-toolbelt</pre>



<p class="wp-block-paragraph">The difference between <code>pip</code> and <code>pip3</code> is that <code>pip3</code> is an updated version of <code>pip</code> for Python <a href="https://blog.finxter.com/how-to-check-your-python-version/" target="_blank" rel="noreferrer noopener" title="HOW TO CHECK YOUR PYTHON VERSION">version </a>3. Depending on what&#8217;s first in the <code>PATH</code> variable, <code>pip</code> will refer to your Python 2 or Python 3 installation&#8212;and you cannot know which without checking the environment variables. To resolve this uncertainty, you can use <code>pip3</code>, which will always refer to your default Python 3 installation.</p>



<h2 class="wp-block-heading">How to Install requests-toolbelt on Linux?</h2>



<p class="wp-block-paragraph">You can install requests-toolbelt on Linux in four steps:</p>



<ol class="wp-block-list"><li>Open your Linux terminal or shell</li><li>Type &#8220;<code>pip install requests-toolbelt</code>&#8221; (without quotes), hit Enter.</li><li>If it doesn&#8217;t work, try <code>"pip3 install requests-toolbelt"</code> or &#8220;<code>python -m pip install requests-toolbelt</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your Linux operating system.</p>



<h2 class="wp-block-heading">How to Install requests-toolbelt on macOS?</h2>



<p class="wp-block-paragraph">Similarly, you can install requests-toolbelt on macOS in four steps:</p>



<ol class="wp-block-list"><li>Open your macOS terminal.</li><li>Type &#8220;<code>pip install requests-toolbelt</code>&#8221; without quotes and hit <code>Enter</code>.</li><li>If it doesn&#8217;t work, try <code>"pip3 install requests-toolbelt"</code> or &#8220;<code>python -m pip install requests-toolbelt</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your macOS.</p>



<h2 class="wp-block-heading">How to Install requests-toolbelt in PyCharm?</h2>



<p class="wp-block-paragraph">Given a <a href="https://blog.finxter.com/pycharm-a-simple-illustrated-guide/" target="_blank" rel="noreferrer noopener">PyCharm </a>project. How to install the requests-toolbelt library in your project within a <a href="https://blog.finxter.com/python-virtual-environments-with-venv-a-step-by-step-guide/" target="_blank" rel="noreferrer noopener">virtual environment</a> or globally? Here’s a <a href="https://blog.finxter.com/how-to-install-a-library-on-pycharm/" target="_blank" rel="noreferrer noopener">solution </a>that always works:</p>



<ul class="wp-block-list"><li>Open <code><strong>File &gt; Settings &gt; Project</strong></code> from the PyCharm menu.</li><li>Select your current project.</li><li>Click the <code><strong>Python Interpreter</strong></code> tab within your project tab.</li><li>Click the small <code><strong>+</strong></code> symbol to add a new library to the project.</li><li>Now type in the library to be installed, in your example <code>"requests-toolbelt"</code> without quotes, and click <code><strong>Install Package</strong></code>.</li><li>Wait for the installation to terminate and close all pop-ups.</li></ul>



<p class="wp-block-paragraph">Here’s the general package installation process as a short animated video—it works analogously for requests-toolbelt if you type in <em>&#8220;requests-toolbelt&#8221;</em> in the search field instead:</p>



<figure class="wp-block-image"><img decoding="async" src="https://media.giphy.com/media/VQoZIvOyP23tVvQlW0/source.gif" alt=""/></figure>



<p class="wp-block-paragraph">Make sure to select only <em>&#8220;requests-toolbelt&#8221; </em>because there may be other packages that are not required but also contain the same term (<em>false positives</em>):</p>



<h2 class="wp-block-heading">How to Install requests-toolbelt in a Jupyter Notebook?</h2>



<p class="wp-block-paragraph">To install any package in a Jupyter notebook, you can prefix the <code>!pip install my_package</code> statement with the exclamation mark <code>"!"</code>. This works for the requests-toolbelt library too:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">!pip install my_package</pre>



<p class="wp-block-paragraph">This automatically installs the requests-toolbelt library when the cell is first executed.</p>



<h2 class="wp-block-heading">How to Resolve ModuleNotFoundError: No module named &#8216;requests-toolbelt&#8217;?</h2>



<p class="wp-block-paragraph">Say you try to import the requests-toolbelt package into your Python script without installing it first:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import requests-toolbelt
# ... ModuleNotFoundError: No module named 'requests-toolbelt'</pre>



<p class="wp-block-paragraph">Because you haven&#8217;t installed the package, Python raises a <code>ModuleNotFoundError: No module named 'requests-toolbelt'</code>. </p>



<p class="wp-block-paragraph">To fix the error, install the requests-toolbelt library using &#8220;<code>pip install requests-toolbelt</code>&#8221; or &#8220;<code>pip3 install requests-toolbelt</code>&#8221; in your operating system&#8217;s shell or terminal first. </p>



<p class="wp-block-paragraph">See above for the different ways to install requests-toolbelt in your environment.</p>



<h2 class="wp-block-heading">Improve Your Python Skills</h2>



<p class="wp-block-paragraph">If you want to keep improving your Python skills and learn about new and exciting technologies such as Blockchain development, machine learning, and data science, check out the Finxter <a href="https://blog.finxter.com/email-academy/" title="Email Academy" target="_blank" rel="noreferrer noopener">free email academy</a> with cheat sheets, regular tutorials, and programming puzzles.</p>






<p class="wp-block-paragraph">Join us, it&#8217;s fun! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Install pymysql in Python?</title>
		<link>https://blog.finxter.com/how-to-install-pymysql-in-python/</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Wed, 06 Jul 2022 14:42:22 +0000</pubDate>
				<category><![CDATA[Dependency Management]]></category>
		<category><![CDATA[Jupyter]]></category>
		<category><![CDATA[pip]]></category>
		<category><![CDATA[PyCharm]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<guid isPermaLink="false">https://blog.finxter.com/?p=457073</guid>

					<description><![CDATA[The Python pymysql library is among the top 100 Python libraries, with more than 27,645,936 downloads. This article will show you everything you need to get this installed in your Python environment. Library Link How to Install pymysql on Windows? Type "cmd" in the search bar and hit Enter to open the command line. Type ... <a title="How to Install pymysql in Python?" class="read-more" href="https://blog.finxter.com/how-to-install-pymysql-in-python/" aria-label="Read more about How to Install pymysql in Python?">Read more</a>]]></description>
										<content:encoded><![CDATA[
<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install pymysql</pre>



<p class="wp-block-paragraph">The Python <strong>pymysql </strong>library is among the top 100 Python libraries, with more than <strong>27,645,936</strong> downloads. This article will show you everything you need to get this installed in your Python environment.</p>



<ul class="wp-block-list"><li><a href="https://pypi.org/project/pymysql" target="_blank" rel="noreferrer noopener" title="https://pypi.org/project/pymysql">Library Link</a></li></ul>



<h2 class="wp-block-heading">How to Install pymysql on Windows?</h2>



<ol class="wp-block-list"><li>Type <code>"cmd"</code> in the search bar and hit <code>Enter</code> to open the command line.</li><li>Type &#8220;<code>pip install pymysql</code>&#8221; (without quotes) in the command line and hit <code>Enter</code> again. This installs pymysql for your default Python installation.</li><li>The previous command may not work if you have both Python versions 2 and 3 on your computer. In this case, try <code>"pip3 install pymysql"</code> or &#8220;<code>python -m pip install pymysql</code>&#8220;.</li><li>Wait for the installation to terminate successfully. It is now installed on your Windows machine.</li></ol>



<p class="wp-block-paragraph">Here&#8217;s how to open the command line on a (German) Windows machine:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="986" height="852" src="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png" alt="Open CMD in Windows" class="wp-image-35703" srcset="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png 986w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-300x259.png 300w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-768x664.png 768w" sizes="auto, (max-width: 986px) 100vw, 986px" /></figure>



<p class="wp-block-paragraph">First, try the following command to install <strong>pymysql</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install pymysql</pre>



<p class="wp-block-paragraph">Second, if this leads to an error message, try this command to install <strong>pymysql</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip3 install pymysql</pre>



<p class="wp-block-paragraph">Third, if both do not work, use the following long-form command:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python -m pip install pymysql</pre>



<p class="wp-block-paragraph">The difference between <code>pip</code> and <code>pip3</code> is that <code>pip3</code> is an updated version of <code>pip</code> for Python <a href="https://blog.finxter.com/how-to-check-your-python-version/" target="_blank" rel="noreferrer noopener" title="HOW TO CHECK YOUR PYTHON VERSION">version </a>3. Depending on what&#8217;s first in the <code>PATH</code> variable, <code>pip</code> will refer to your Python 2 or Python 3 installation&#8212;and you cannot know which without checking the environment variables. To resolve this uncertainty, you can use <code>pip3</code>, which will always refer to your default Python 3 installation.</p>



<h2 class="wp-block-heading">How to Install pymysql on Linux?</h2>



<p class="wp-block-paragraph">You can install pymysql on Linux in four steps:</p>



<ol class="wp-block-list"><li>Open your Linux terminal or shell</li><li>Type &#8220;<code>pip install pymysql</code>&#8221; (without quotes), hit Enter.</li><li>If it doesn&#8217;t work, try <code>"pip3 install pymysql"</code> or &#8220;<code>python -m pip install pymysql</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your Linux operating system.</p>



<h2 class="wp-block-heading">How to Install pymysql on macOS?</h2>



<p class="wp-block-paragraph">Similarly, you can install pymysql on macOS in four steps:</p>



<ol class="wp-block-list"><li>Open your macOS terminal.</li><li>Type &#8220;<code>pip install pymysql</code>&#8221; without quotes and hit <code>Enter</code>.</li><li>If it doesn&#8217;t work, try <code>"pip3 install pymysql"</code> or &#8220;<code>python -m pip install pymysql</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your macOS.</p>



<h2 class="wp-block-heading">How to Install pymysql in PyCharm?</h2>



<p class="wp-block-paragraph">Given a <a href="https://blog.finxter.com/pycharm-a-simple-illustrated-guide/" target="_blank" rel="noreferrer noopener">PyCharm </a>project. How to install the pymysql library in your project within a <a href="https://blog.finxter.com/python-virtual-environments-with-venv-a-step-by-step-guide/" target="_blank" rel="noreferrer noopener">virtual environment</a> or globally? Here’s a <a href="https://blog.finxter.com/how-to-install-a-library-on-pycharm/" target="_blank" rel="noreferrer noopener">solution </a>that always works:</p>



<ul class="wp-block-list"><li>Open <code><strong>File &gt; Settings &gt; Project</strong></code> from the PyCharm menu.</li><li>Select your current project.</li><li>Click the <code><strong>Python Interpreter</strong></code> tab within your project tab.</li><li>Click the small <code><strong>+</strong></code> symbol to add a new library to the project.</li><li>Now type in the library to be installed, in your example <code>"pymysql"</code> without quotes, and click <code><strong>Install Package</strong></code>.</li><li>Wait for the installation to terminate and close all pop-ups.</li></ul>



<p class="wp-block-paragraph">Here’s the general package installation process as a short animated video—it works analogously for pymysql if you type in <em>&#8220;pymysql&#8221;</em> in the search field instead:</p>



<figure class="wp-block-image"><img decoding="async" src="https://media.giphy.com/media/VQoZIvOyP23tVvQlW0/source.gif" alt=""/></figure>



<p class="wp-block-paragraph">Make sure to select only <em>&#8220;pymysql&#8221; </em>because there may be other packages that are not required but also contain the same term (<em>false positives</em>):</p>



<h2 class="wp-block-heading">How to Install pymysql in a Jupyter Notebook?</h2>



<p class="wp-block-paragraph">To install any package in a Jupyter notebook, you can prefix the <code>!pip install my_package</code> statement with the exclamation mark <code>"!"</code>. This works for the pymysql library too:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">!pip install my_package</pre>



<p class="wp-block-paragraph">This automatically installs the pymysql library when the cell is first executed.</p>



<h2 class="wp-block-heading">How to Resolve ModuleNotFoundError: No module named &#8216;pymysql&#8217;?</h2>



<p class="wp-block-paragraph">Say you try to import the pymysql package into your Python script without installing it first:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import pymysql
# ... ModuleNotFoundError: No module named 'pymysql'</pre>



<p class="wp-block-paragraph">Because you haven&#8217;t installed the package, Python raises a <code>ModuleNotFoundError: No module named 'pymysql'</code>. </p>



<p class="wp-block-paragraph">To fix the error, install the pymysql library using &#8220;<code>pip install pymysql</code>&#8221; or &#8220;<code>pip3 install pymysql</code>&#8221; in your operating system&#8217;s shell or terminal first. </p>



<p class="wp-block-paragraph">See above for the different ways to install pymysql in your environment.</p>



<h2 class="wp-block-heading">Improve Your Python Skills</h2>



<p class="wp-block-paragraph">If you want to keep improving your Python skills and learn about new and exciting technologies such as Blockchain development, machine learning, and data science, check out the Finxter <a href="https://blog.finxter.com/email-academy/" title="Email Academy" target="_blank" rel="noreferrer noopener">free email academy</a> with cheat sheets, regular tutorials, and programming puzzles.</p>






<p class="wp-block-paragraph">Join us, it&#8217;s fun! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Install py4j in Python?</title>
		<link>https://blog.finxter.com/how-to-install-py4j-in-python/</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Wed, 06 Jul 2022 14:41:59 +0000</pubDate>
				<category><![CDATA[Dependency Management]]></category>
		<category><![CDATA[Jupyter]]></category>
		<category><![CDATA[pip]]></category>
		<category><![CDATA[PyCharm]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<guid isPermaLink="false">https://blog.finxter.com/?p=457074</guid>

					<description><![CDATA[The Python py4j library is among the top 100 Python libraries, with more than 27,263,225 downloads. This article will show you everything you need to get this installed in your Python environment. Library Link How to Install py4j on Windows? Type "cmd" in the search bar and hit Enter to open the command line. Type ... <a title="How to Install py4j in Python?" class="read-more" href="https://blog.finxter.com/how-to-install-py4j-in-python/" aria-label="Read more about How to Install py4j in Python?">Read more</a>]]></description>
										<content:encoded><![CDATA[
<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install py4j</pre>



<p class="wp-block-paragraph">The Python <strong>py4j </strong>library is among the top 100 Python libraries, with more than <strong>27,263,225</strong> downloads. This article will show you everything you need to get this installed in your Python environment.</p>



<ul class="wp-block-list"><li><a href="https://pypi.org/project/py4j" target="_blank" rel="noreferrer noopener" title="https://pypi.org/project/py4j">Library Link</a></li></ul>



<h2 class="wp-block-heading">How to Install py4j on Windows?</h2>



<ol class="wp-block-list"><li>Type <code>"cmd"</code> in the search bar and hit <code>Enter</code> to open the command line.</li><li>Type &#8220;<code>pip install py4j</code>&#8221; (without quotes) in the command line and hit <code>Enter</code> again. This installs py4j for your default Python installation.</li><li>The previous command may not work if you have both Python versions 2 and 3 on your computer. In this case, try <code>"pip3 install py4j"</code> or &#8220;<code>python -m pip install py4j</code>&#8220;.</li><li>Wait for the installation to terminate successfully. It is now installed on your Windows machine.</li></ol>



<p class="wp-block-paragraph">Here&#8217;s how to open the command line on a (German) Windows machine:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="986" height="852" src="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png" alt="Open CMD in Windows" class="wp-image-35703" srcset="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png 986w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-300x259.png 300w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-768x664.png 768w" sizes="auto, (max-width: 986px) 100vw, 986px" /></figure>



<p class="wp-block-paragraph">First, try the following command to install <strong>py4j</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install py4j</pre>



<p class="wp-block-paragraph">Second, if this leads to an error message, try this command to install <strong>py4j</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip3 install py4j</pre>



<p class="wp-block-paragraph">Third, if both do not work, use the following long-form command:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python -m pip install py4j</pre>



<p class="wp-block-paragraph">The difference between <code>pip</code> and <code>pip3</code> is that <code>pip3</code> is an updated version of <code>pip</code> for Python <a href="https://blog.finxter.com/how-to-check-your-python-version/" target="_blank" rel="noreferrer noopener" title="HOW TO CHECK YOUR PYTHON VERSION">version </a>3. Depending on what&#8217;s first in the <code>PATH</code> variable, <code>pip</code> will refer to your Python 2 or Python 3 installation&#8212;and you cannot know which without checking the environment variables. To resolve this uncertainty, you can use <code>pip3</code>, which will always refer to your default Python 3 installation.</p>



<h2 class="wp-block-heading">How to Install py4j on Linux?</h2>



<p class="wp-block-paragraph">You can install py4j on Linux in four steps:</p>



<ol class="wp-block-list"><li>Open your Linux terminal or shell</li><li>Type &#8220;<code>pip install py4j</code>&#8221; (without quotes), hit Enter.</li><li>If it doesn&#8217;t work, try <code>"pip3 install py4j"</code> or &#8220;<code>python -m pip install py4j</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your Linux operating system.</p>



<h2 class="wp-block-heading">How to Install py4j on macOS?</h2>



<p class="wp-block-paragraph">Similarly, you can install py4j on macOS in four steps:</p>



<ol class="wp-block-list"><li>Open your macOS terminal.</li><li>Type &#8220;<code>pip install py4j</code>&#8221; without quotes and hit <code>Enter</code>.</li><li>If it doesn&#8217;t work, try <code>"pip3 install py4j"</code> or &#8220;<code>python -m pip install py4j</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your macOS.</p>



<h2 class="wp-block-heading">How to Install py4j in PyCharm?</h2>



<p class="wp-block-paragraph">Given a <a href="https://blog.finxter.com/pycharm-a-simple-illustrated-guide/" target="_blank" rel="noreferrer noopener">PyCharm </a>project. How to install the py4j library in your project within a <a href="https://blog.finxter.com/python-virtual-environments-with-venv-a-step-by-step-guide/" target="_blank" rel="noreferrer noopener">virtual environment</a> or globally? Here’s a <a href="https://blog.finxter.com/how-to-install-a-library-on-pycharm/" target="_blank" rel="noreferrer noopener">solution </a>that always works:</p>



<ul class="wp-block-list"><li>Open <code><strong>File &gt; Settings &gt; Project</strong></code> from the PyCharm menu.</li><li>Select your current project.</li><li>Click the <code><strong>Python Interpreter</strong></code> tab within your project tab.</li><li>Click the small <code><strong>+</strong></code> symbol to add a new library to the project.</li><li>Now type in the library to be installed, in your example <code>"py4j"</code> without quotes, and click <code><strong>Install Package</strong></code>.</li><li>Wait for the installation to terminate and close all pop-ups.</li></ul>



<p class="wp-block-paragraph">Here’s the general package installation process as a short animated video—it works analogously for py4j if you type in <em>&#8220;py4j&#8221;</em> in the search field instead:</p>



<figure class="wp-block-image"><img decoding="async" src="https://media.giphy.com/media/VQoZIvOyP23tVvQlW0/source.gif" alt=""/></figure>



<p class="wp-block-paragraph">Make sure to select only <em>&#8220;py4j&#8221; </em>because there may be other packages that are not required but also contain the same term (<em>false positives</em>):</p>



<h2 class="wp-block-heading">How to Install py4j in a Jupyter Notebook?</h2>



<p class="wp-block-paragraph">To install any package in a Jupyter notebook, you can prefix the <code>!pip install my_package</code> statement with the exclamation mark <code>"!"</code>. This works for the py4j library too:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">!pip install my_package</pre>



<p class="wp-block-paragraph">This automatically installs the py4j library when the cell is first executed.</p>



<h2 class="wp-block-heading">How to Resolve ModuleNotFoundError: No module named &#8216;py4j&#8217;?</h2>



<p class="wp-block-paragraph">Say you try to import the py4j package into your Python script without installing it first:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import py4j
# ... ModuleNotFoundError: No module named 'py4j'</pre>



<p class="wp-block-paragraph">Because you haven&#8217;t installed the package, Python raises a <code>ModuleNotFoundError: No module named 'py4j'</code>. </p>



<p class="wp-block-paragraph">To fix the error, install the py4j library using &#8220;<code>pip install py4j</code>&#8221; or &#8220;<code>pip3 install py4j</code>&#8221; in your operating system&#8217;s shell or terminal first. </p>



<p class="wp-block-paragraph">See above for the different ways to install py4j in your environment.</p>



<h2 class="wp-block-heading">Improve Your Python Skills</h2>



<p class="wp-block-paragraph">If you want to keep improving your Python skills and learn about new and exciting technologies such as Blockchain development, machine learning, and data science, check out the Finxter <a href="https://blog.finxter.com/email-academy/" title="Email Academy" target="_blank" rel="noreferrer noopener">free email academy</a> with cheat sheets, regular tutorials, and programming puzzles.</p>






<p class="wp-block-paragraph">Join us, it&#8217;s fun! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Install cloudpickle in Python?</title>
		<link>https://blog.finxter.com/how-to-install-cloudpickle-in-python/</link>
		
		<dc:creator><![CDATA[Chris]]></dc:creator>
		<pubDate>Wed, 06 Jul 2022 14:37:48 +0000</pubDate>
				<category><![CDATA[Dependency Management]]></category>
		<category><![CDATA[Jupyter]]></category>
		<category><![CDATA[pip]]></category>
		<category><![CDATA[PyCharm]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Scripting]]></category>
		<guid isPermaLink="false">https://blog.finxter.com/?p=457075</guid>

					<description><![CDATA[The Python cloudpickle library is among the top 100 Python libraries, with more than 27,283,023 downloads. This article will show you everything you need to get this installed in your Python environment. Library Link How to Install cloudpickle on Windows? Type "cmd" in the search bar and hit Enter to open the command line. Type ... <a title="How to Install cloudpickle in Python?" class="read-more" href="https://blog.finxter.com/how-to-install-cloudpickle-in-python/" aria-label="Read more about How to Install cloudpickle in Python?">Read more</a>]]></description>
										<content:encoded><![CDATA[
<pre class="EnlighterJSRAW" data-enlighter-language="raw" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install cloudpickle</pre>



<p class="wp-block-paragraph">The Python <strong>cloudpickle </strong>library is among the top 100 Python libraries, with more than <strong>27,283,023</strong> downloads. This article will show you everything you need to get this installed in your Python environment.</p>



<ul class="wp-block-list"><li><a href="https://pypi.org/project/cloudpickle" target="_blank" rel="noreferrer noopener" title="https://pypi.org/project/cloudpickle">Library Link</a></li></ul>



<h2 class="wp-block-heading">How to Install cloudpickle on Windows?</h2>



<ol class="wp-block-list"><li>Type <code>"cmd"</code> in the search bar and hit <code>Enter</code> to open the command line.</li><li>Type &#8220;<code>pip install cloudpickle</code>&#8221; (without quotes) in the command line and hit <code>Enter</code> again. This installs cloudpickle for your default Python installation.</li><li>The previous command may not work if you have both Python versions 2 and 3 on your computer. In this case, try <code>"pip3 install cloudpickle"</code> or &#8220;<code>python -m pip install cloudpickle</code>&#8220;.</li><li>Wait for the installation to terminate successfully. It is now installed on your Windows machine.</li></ol>



<p class="wp-block-paragraph">Here&#8217;s how to open the command line on a (German) Windows machine:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="986" height="852" src="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png" alt="Open CMD in Windows" class="wp-image-35703" srcset="https://blog.finxter.com/wp-content/uploads/2021/09/image-96.png 986w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-300x259.png 300w, https://blog.finxter.com/wp-content/uploads/2021/09/image-96-768x664.png 768w" sizes="auto, (max-width: 986px) 100vw, 986px" /></figure>



<p class="wp-block-paragraph">First, try the following command to install <strong>cloudpickle</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip install cloudpickle</pre>



<p class="wp-block-paragraph">Second, if this leads to an error message, try this command to install <strong>cloudpickle</strong> on your system:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="powershell" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">pip3 install cloudpickle</pre>



<p class="wp-block-paragraph">Third, if both do not work, use the following long-form command:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python -m pip install cloudpickle</pre>



<p class="wp-block-paragraph">The difference between <code>pip</code> and <code>pip3</code> is that <code>pip3</code> is an updated version of <code>pip</code> for Python <a href="https://blog.finxter.com/how-to-check-your-python-version/" target="_blank" rel="noreferrer noopener" title="HOW TO CHECK YOUR PYTHON VERSION">version </a>3. Depending on what&#8217;s first in the <code>PATH</code> variable, <code>pip</code> will refer to your Python 2 or Python 3 installation&#8212;and you cannot know which without checking the environment variables. To resolve this uncertainty, you can use <code>pip3</code>, which will always refer to your default Python 3 installation.</p>



<h2 class="wp-block-heading">How to Install cloudpickle on Linux?</h2>



<p class="wp-block-paragraph">You can install cloudpickle on Linux in four steps:</p>



<ol class="wp-block-list"><li>Open your Linux terminal or shell</li><li>Type &#8220;<code>pip install cloudpickle</code>&#8221; (without quotes), hit Enter.</li><li>If it doesn&#8217;t work, try <code>"pip3 install cloudpickle"</code> or &#8220;<code>python -m pip install cloudpickle</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your Linux operating system.</p>



<h2 class="wp-block-heading">How to Install cloudpickle on macOS?</h2>



<p class="wp-block-paragraph">Similarly, you can install cloudpickle on macOS in four steps:</p>



<ol class="wp-block-list"><li>Open your macOS terminal.</li><li>Type &#8220;<code>pip install cloudpickle</code>&#8221; without quotes and hit <code>Enter</code>.</li><li>If it doesn&#8217;t work, try <code>"pip3 install cloudpickle"</code> or &#8220;<code>python -m pip install cloudpickle</code>&#8220;.</li><li>Wait for the installation to terminate successfully. </li></ol>



<p class="wp-block-paragraph">The package is now installed on your macOS.</p>



<h2 class="wp-block-heading">How to Install cloudpickle in PyCharm?</h2>



<p class="wp-block-paragraph">Given a <a href="https://blog.finxter.com/pycharm-a-simple-illustrated-guide/" target="_blank" rel="noreferrer noopener">PyCharm </a>project. How to install the cloudpickle library in your project within a <a href="https://blog.finxter.com/python-virtual-environments-with-venv-a-step-by-step-guide/" target="_blank" rel="noreferrer noopener">virtual environment</a> or globally? Here’s a <a href="https://blog.finxter.com/how-to-install-a-library-on-pycharm/" target="_blank" rel="noreferrer noopener">solution </a>that always works:</p>



<ul class="wp-block-list"><li>Open <code><strong>File &gt; Settings &gt; Project</strong></code> from the PyCharm menu.</li><li>Select your current project.</li><li>Click the <code><strong>Python Interpreter</strong></code> tab within your project tab.</li><li>Click the small <code><strong>+</strong></code> symbol to add a new library to the project.</li><li>Now type in the library to be installed, in your example <code>"cloudpickle"</code> without quotes, and click <code><strong>Install Package</strong></code>.</li><li>Wait for the installation to terminate and close all pop-ups.</li></ul>



<p class="wp-block-paragraph">Here’s the general package installation process as a short animated video—it works analogously for cloudpickle if you type in <em>&#8220;cloudpickle&#8221;</em> in the search field instead:</p>



<figure class="wp-block-image"><img decoding="async" src="https://media.giphy.com/media/VQoZIvOyP23tVvQlW0/source.gif" alt=""/></figure>



<p class="wp-block-paragraph">Make sure to select only <em>&#8220;cloudpickle&#8221; </em>because there may be other packages that are not required but also contain the same term (<em>false positives</em>):</p>



<h2 class="wp-block-heading">How to Install cloudpickle in a Jupyter Notebook?</h2>



<p class="wp-block-paragraph">To install any package in a Jupyter notebook, you can prefix the <code>!pip install my_package</code> statement with the exclamation mark <code>"!"</code>. This works for the cloudpickle library too:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">!pip install my_package</pre>



<p class="wp-block-paragraph">This automatically installs the cloudpickle library when the cell is first executed.</p>



<h2 class="wp-block-heading">How to Resolve ModuleNotFoundError: No module named &#8216;cloudpickle&#8217;?</h2>



<p class="wp-block-paragraph">Say you try to import the cloudpickle package into your Python script without installing it first:</p>



<pre class="EnlighterJSRAW" data-enlighter-language="python" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import cloudpickle
# ... ModuleNotFoundError: No module named 'cloudpickle'</pre>



<p class="wp-block-paragraph">Because you haven&#8217;t installed the package, Python raises a <code>ModuleNotFoundError: No module named 'cloudpickle'</code>. </p>



<p class="wp-block-paragraph">To fix the error, install the cloudpickle library using &#8220;<code>pip install cloudpickle</code>&#8221; or &#8220;<code>pip3 install cloudpickle</code>&#8221; in your operating system&#8217;s shell or terminal first. </p>



<p class="wp-block-paragraph">See above for the different ways to install cloudpickle in your environment.</p>



<h2 class="wp-block-heading">Improve Your Python Skills</h2>



<p class="wp-block-paragraph">If you want to keep improving your Python skills and learn about new and exciting technologies such as Blockchain development, machine learning, and data science, check out the Finxter <a href="https://blog.finxter.com/email-academy/" title="Email Academy" target="_blank" rel="noreferrer noopener">free email academy</a> with cheat sheets, regular tutorials, and programming puzzles.</p>






<p class="wp-block-paragraph">Join us, it&#8217;s fun! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: blog.finxter.com @ 2026-11-21 11:00:38 by W3 Total Cache
-->