<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: TwoMoreSteps</title>
    <description>The latest articles on DEV Community by TwoMoreSteps (@twomoresteps).</description>
    <link>https://dev.to/twomoresteps</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3898370%2F9c9a6cef-10c8-4c81-a82e-7ad4e847cd47.jpg</url>
      <title>DEV Community: TwoMoreSteps</title>
      <link>https://dev.to/twomoresteps</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/twomoresteps"/>
    <language>en</language>
    <item>
      <title>How to install python package in Spyder standalone</title>
      <dc:creator>TwoMoreSteps</dc:creator>
      <pubDate>Sun, 26 Apr 2026 06:17:34 +0000</pubDate>
      <link>https://dev.to/twomoresteps/how-to-install-python-package-in-spyder-standalone-d5m</link>
      <guid>https://dev.to/twomoresteps/how-to-install-python-package-in-spyder-standalone-d5m</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;spyder-package-installer&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install third-party Python packages in Spyder standalone installation (non-Anaconda version)&lt;/span&gt;
&lt;span class="na"&gt;license&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;MIT&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Installing Third-Party Packages in Spyder Standalone Installation
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Environment:&lt;/strong&gt; Windows, Spyder standalone installation (non-Anaconda version)&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Use Case:&lt;/strong&gt; Install any third-party Python package, such as &lt;code&gt;requests&lt;/code&gt;, &lt;code&gt;beautifulsoup4&lt;/code&gt;, &lt;code&gt;scikit-learn&lt;/code&gt;, etc.&lt;/p&gt;


&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;Spyder standalone installation comes with an isolated Python environment, completely independent from other Python installations on your system (such as Python 3.14 or Anaconda). Therefore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Running &lt;code&gt;pip install XXX&lt;/code&gt; directly in the system terminal &lt;strong&gt;will NOT&lt;/strong&gt; install to Spyder's environment&lt;/li&gt;
&lt;li&gt;Running &lt;code&gt;!pip install XXX&lt;/code&gt; in Spyder's IPython console is &lt;strong&gt;unreliable&lt;/strong&gt; - Spyder has blocked this method&lt;/li&gt;
&lt;li&gt;You must locate Spyder's own Python path to install packages correctly&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Installation Steps
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Step 1: Confirm Spyder's Actual Python Path
&lt;/h3&gt;

&lt;p&gt;Run the following in Spyder's &lt;strong&gt;IPython console&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;executable&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note the output path, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;D:\ProgramData\spyder-6\envs\spyder-runtime\python.exe
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;⚠️ Don't guess the path - it may differ on each computer. You must use this command to confirm.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Step 2: Open Git Bash as Administrator
&lt;/h3&gt;

&lt;p&gt;Find &lt;strong&gt;Git Bash&lt;/strong&gt; in the Start menu → Right-click → &lt;strong&gt;Run as administrator&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Administrator privileges are required, otherwise you'll get &lt;code&gt;PermissionError [WinError 5] Access Denied&lt;/code&gt; when writing to &lt;code&gt;D:\ProgramData\&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Step 3: Install pip for Spyder's Python (First Time Only)
&lt;/h3&gt;

&lt;p&gt;Convert the path from Step 1 to Git Bash format (&lt;code&gt;D:\&lt;/code&gt; → &lt;code&gt;/d/&lt;/code&gt;, backslash &lt;code&gt;\&lt;/code&gt; → forward slash &lt;code&gt;/&lt;/code&gt;), then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/d/ProgramData/spyder-6/envs/spyder-runtime/python.exe &lt;span class="nt"&gt;-m&lt;/span&gt; ensurepip &lt;span class="nt"&gt;--upgrade&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Success is indicated by &lt;code&gt;Successfully installed pip-xx.x&lt;/code&gt;. You don't need to repeat this step afterward.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 4: Install the Target Package
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/d/ProgramData/spyder-6/envs/spyder-runtime/python.exe &lt;span class="nt"&gt;-m&lt;/span&gt; pip &lt;span class="nb"&gt;install &lt;/span&gt;XXX &lt;span class="nt"&gt;--target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"D:&lt;/span&gt;&lt;span class="se"&gt;\P&lt;/span&gt;&lt;span class="s2"&gt;rogramData&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="s2"&gt;pyder-6&lt;/span&gt;&lt;span class="se"&gt;\e&lt;/span&gt;&lt;span class="s2"&gt;nvs&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="s2"&gt;pyder-runtime&lt;/span&gt;&lt;span class="se"&gt;\L&lt;/span&gt;&lt;span class="s2"&gt;ib&lt;/span&gt;&lt;span class="se"&gt;\s&lt;/span&gt;&lt;span class="s2"&gt;ite-packages"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace &lt;code&gt;XXX&lt;/code&gt; with your desired package name, such as &lt;code&gt;requests&lt;/code&gt;, &lt;code&gt;beautifulsoup4&lt;/code&gt;, &lt;code&gt;scikit-learn&lt;/code&gt;, etc.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;--target&lt;/code&gt; parameter forces the package to install into Spyder's &lt;code&gt;site-packages&lt;/code&gt; directory, ensuring Spyder can find it.&lt;/p&gt;

&lt;p&gt;Success is indicated by:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Successfully installed XXX-x.x.x ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;WARNING messages about existing packages can be ignored - they're not errors.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Step 5: Restart Spyder
&lt;/h3&gt;

&lt;p&gt;Completely close Spyder and reopen it to make the newly installed package take effect.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 6: Verify Installation
&lt;/h3&gt;

&lt;p&gt;Run the following in Spyder's IPython console:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;XXX&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;XXX&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;__version__&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No errors means the installation was successful.&lt;/p&gt;




&lt;h2&gt;
  
  
  Path Format Conversion Rules (Git Bash)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Windows Format&lt;/th&gt;
&lt;th&gt;Git Bash Format&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;D:\ProgramData\spyder-6\python.exe&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/d/ProgramData/spyder-6/python.exe&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;C:\Users\Andy\...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;/c/Users/Andy/...&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Rules: Lowercase drive letter, change &lt;code&gt;\&lt;/code&gt; to &lt;code&gt;/&lt;/code&gt;, remove colon, add &lt;code&gt;/&lt;/code&gt; at the beginning.&lt;/p&gt;




&lt;h2&gt;
  
  
  Common Issues
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Issue&lt;/th&gt;
&lt;th&gt;Cause&lt;/th&gt;
&lt;th&gt;Solution&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;No module named 'XXX'&lt;/code&gt; (still errors)&lt;/td&gt;
&lt;td&gt;Installed to wrong Python environment&lt;/td&gt;
&lt;td&gt;Confirm path with &lt;code&gt;sys.executable&lt;/code&gt;, reinstall&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;No module named pip&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Spyder's Python doesn't have pip&lt;/td&gt;
&lt;td&gt;Execute Step 3 to install pip first&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;PermissionError [WinError 5]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No administrator privileges&lt;/td&gt;
&lt;td&gt;Run Git Bash as administrator&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;!pip install&lt;/code&gt; doesn't work&lt;/td&gt;
&lt;td&gt;Spyder has blocked this method&lt;/td&gt;
&lt;td&gt;Use Git Bash (as administrator) instead&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Spyder standalone installation has its own isolated Python environment. When installing third-party packages, you must:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use &lt;code&gt;sys.executable&lt;/code&gt; to find Spyder's actual Python path&lt;/li&gt;
&lt;li&gt;Open Git Bash &lt;strong&gt;as administrator&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Use the &lt;code&gt;--target&lt;/code&gt; parameter to install packages into Spyder's corresponding &lt;code&gt;site-packages&lt;/code&gt; directory&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

</description>
      <category>spyder</category>
      <category>python</category>
      <category>installation</category>
      <category>thirdparty</category>
    </item>
  </channel>
</rss>
