<?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: Tong Li</title>
    <description>The latest articles on DEV Community by Tong Li (@tong_li_bb2930faa47a421b0).</description>
    <link>https://dev.to/tong_li_bb2930faa47a421b0</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%2F1509265%2F0294a33e-f574-4140-8ce6-1f0243bc207d.png</url>
      <title>DEV Community: Tong Li</title>
      <link>https://dev.to/tong_li_bb2930faa47a421b0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tong_li_bb2930faa47a421b0"/>
    <language>en</language>
    <item>
      <title>mpip- python package manager</title>
      <dc:creator>Tong Li</dc:creator>
      <pubDate>Tue, 21 May 2024 07:29:55 +0000</pubDate>
      <link>https://dev.to/tong_li_bb2930faa47a421b0/mpip-python-package-manager-3lcd</link>
      <guid>https://dev.to/tong_li_bb2930faa47a421b0/mpip-python-package-manager-3lcd</guid>
      <description>&lt;h1&gt;
  
  
  mpip
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;mpip&lt;/code&gt; is a command line tool written in Go for installing and uninstalling Python packages, and automatically updating the &lt;code&gt;requirements.txt&lt;/code&gt; file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Install Python packages and add them to &lt;code&gt;requirements.txt&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Uninstall Python packages and remove them from &lt;code&gt;requirements.txt&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  download
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/litongjava/mpip/releases/tag/"&gt;github&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;First, clone this repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/litongjava/mpip.git
&lt;span class="nb"&gt;cd &lt;/span&gt;mpip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, compile the &lt;code&gt;mpip&lt;/code&gt; tool:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go build &lt;span class="nt"&gt;-o&lt;/span&gt; mpip main.go
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will generate an executable named &lt;code&gt;mpip&lt;/code&gt; in the current directory. Please add &lt;code&gt;mpip&lt;/code&gt; to your path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;go install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will be automatically added to the go-path.&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Installing Packages
&lt;/h3&gt;

&lt;p&gt;Use the &lt;code&gt;mpip install &amp;lt;package&amp;gt;&lt;/code&gt; command to install a Python package and add the package name to the &lt;code&gt;requirements.txt&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mpip &lt;span class="nb"&gt;install&lt;/span&gt; &amp;lt;package&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, to install the &lt;code&gt;requests&lt;/code&gt; package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mpip &lt;span class="nb"&gt;install &lt;/span&gt;requests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Uninstalling Packages
&lt;/h3&gt;

&lt;p&gt;Use the &lt;code&gt;mpip uninstall &amp;lt;package&amp;gt;&lt;/code&gt; command to uninstall a Python package and remove the package name from the &lt;code&gt;requirements.txt&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mpip uninstall &amp;lt;package&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, to uninstall the &lt;code&gt;requests&lt;/code&gt; package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mpip uninstall requests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Notes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Ensure that &lt;code&gt;pip&lt;/code&gt; is installed in your environment and accessible from the command line.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;requirements.txt&lt;/code&gt; file will be automatically created or updated in the current directory.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Contribution
&lt;/h2&gt;

&lt;p&gt;If you have any suggestions for improvements or find any issues, please submit a pull request or an issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

&lt;p&gt;This project uses the MIT license. For more information, see the &lt;a href="https://dev.toLICENSE"&gt;LICENSE&lt;/a&gt; file.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
