The pip tool is becoming the standard in equivalent of Ruby's gems.

Like distribute, pip uses the PyPI package repository (by default) for resolving and downloading dependencies.

pip can install dependencies from a file listing project dependencies (called requirements.txt by convention):

pip install -r requirements.txt

You can "freeze" the current packages on the Python path using pip as well:

pip freeze > requirements.txt

When used in combination with the virtualenv package, you can reliably create project Python environments with a project's required dependencies.

Answer from Barry Wark on Stack Overflow
🌐
GitHub
github.com › ableinc › pypm
GitHub - ableinc/pypm: Python Package Manager
Pypm is a python package manager for projects using Python 3 and above. This library is similar to npm. This command line tool works just like npm and should mirror its features.
Author   ableinc
Discussions

What's the best package manager for python in your opinion?
uv and it isn't even close More on reddit.com
🌐 r/Python
220
110
October 22, 2025
The Python equivalent to "npm install" from package.json?

Personally I'd say Poetry is overall the closest match for npm, there are no 1:1 equivalents.

I use it everywhere nowadays because it's just so darn nice. I can give it the version ranges I'd like to use, and Poetry finds the best matches for each dependency that don't conflict with each other, saving the exact versions in a lock file much like npm or Cargo would.

Installing dependencies is as simple as

poetry install

and upgrading them equally so:

poetry upgrade

Of course it's not all roses, but I've found it to be a much better tool than pip alone.

More on reddit.com
🌐 r/learnpython
5
5
January 2, 2023
path - How to use pip install python packages locally like npm does - Stack Overflow
Say I have a project named Foo, and and want to install requests package locally for this project. What I am expecting is some structure similar to this: Foo/ |-main.py |-requirements.txt |-README... More on stackoverflow.com
🌐 stackoverflow.com
Python equivalent of `npm install` for a given directory/project?

Yes. Use pip to make a line-delimited file (usually named "requirements.txt") of the currently installed modules:

pip freeze > requirements.txt

Then on your new machine use pip again to install them all:

pip install -r requirements.txt
More on reddit.com
🌐 r/learnpython
5
2
October 18, 2017
🌐
DEV Community
dev.to › adamghill › python-package-manager-comparison-1g98
Python Package Manager Comparison 📦 - DEV Community
November 15, 2023 - 😎 I like trying new tools to see how they work and to improve my workflow. One could look at all of the options for Python packaging and be frustrated by the paradox of choice. I understand that viewpoint, but I also appreciate that all of these tools are making different trade-offs and pushing the state of the art forward in their own ways. Maybe at some point in the future there will be one "approved" Python package manager ala NPM or Cargo, but I am doubtful.
🌐
GitHub
github.com › beenotung › pym
GitHub - beenotung/pym: A package manager for python that works like npm.
pym - python package manager version: ... if needed · As inspired by npm (nodejs package manager), I named this tool ppm (python package manager) initially....
Author   beenotung
🌐
StackShare
stackshare.io › stackups › npm-vs-pip
npm vs pip | What are the differences? | StackShare
Package Installation: npm installs packages locally within a specific project directory, maintaining a separate version of each package for each project. In contrast, pip by default installs packages system-wide, making them accessible to all Python projects. Package Management Commands: npm provides a variety of package management commands, such as install, uninstall, update, and list, to manage packages.
🌐
Inedo
blog.inedo.com › python › managing-python-packages
Python Package Managers Explained
May 1, 2025 - Pipenv is a package management tool that “aims to bring the best of all packaging worlds” to Python. Pipenv is similar in spirit to Node.js’s npm and Ruby’s bundler. It’s popular among the Python community because it merges virtual environments and package management into a single tool.
Find elsewhere
🌐
Reddit
reddit.com › r/learnpython › the python equivalent to "npm install" from package.json?
r/learnpython on Reddit: The Python equivalent to "npm install" from package.json?
January 2, 2023 -

Hello all,

I have a bit of a background in node.js and the npm install feature is quite handy. I've done some googling there seems to be a few ways this is accomplished:

  1. Using PIP requirements.txt

  2. Using a 3rd party platform like Python Poetry

I'm looking for something simple that's the equivalent of npm install. What's the norm?

Kind regards

🌐
Quora
quora.com › When-it-comes-to-package-managers-like-NPM-Pip-Maven-etc-what-makes-one-better-or-worse-than-the-other
When it comes to package managers like NPM, Pip, Maven, etc., what makes one better or worse than the other? - Quora
Just one for JS/ES and the other for Python. But in regards, let me say this: There is no such thing as a front end package manager tool. NPM is the Node Package Manager. Node.js is a JavaScript command line interpreter.
Top answer
1 of 3
1

The usual solution to this problem in the Python world is to use virtualenvs or, even better, a wrapper like pipenv. If you install pipenv, you should be able to create a new virtualenv with a simple pipenv install:

[user@host Foo]$ pipenv install
Creating a virtualenv for this
project… ⠋Using base prefix '/usr' New python executable in
/home/user/.local/share/virtualenvs/Foo-oXnKEj-P/bin/python3 Also
creating executable in
/home/user/.local/share/virtualenvs/Foo-oXnKEj-P/bin/python Installing
setuptools, pip, wheel...done.

Virtualenv location: /home/user/.local/share/virtualenvs/Foo-oXnKEj-P
Creating a Pipfile for this project… Pipfile.lock not found, creating…
Locking [dev-packages] dependencies… Locking [packages] dependencies…
Updated Pipfile.lock (c23e27)!  Installing dependencies from
Pipfile.lock (c23e27)… �� ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 —
00:00:00 To activate this project's virtualenv, run the following: $
pipenv shell

Then enter the virtualenv with pipenv shell

[user@host Foo]$ pipenv shell
Spawning environment shell
(/bin/bash). Use 'exit' to leave. source
/home/user/.local/share/virtualenvs/Foo-oXnKEj-P/bin/activate

[user@host Foo]$ source /home/user/.local/share/virtualenvs/Foo-oXnKEj-P/bin/activate

Finally, you can install the packages in your requirements.txt:

(Foo-oXnKEj-P) [user@host Foo]$ pip install -r requirements.txt
Collecting Django==2.0.4 (from -r requirements.txt (line 1)) Using
cached
https://files.pythonhosted.org/packages/89/f9/94c20658f0cdecc2b6607811e2c0bb042408a51f589e5ad0cb0eac3236a1/Django-2.0.4-py3-none-any.whl
Collecting pytz (from Django==2.0.4->-r requirements.txt (line 1))
Using cached
https://files.pythonhosted.org/packages/dc/83/15f7833b70d3e067ca91467ca245bae0f6fe56ddc7451aa0dc5606b120f2/pytz-2018.4-py2.py3-none-any.whl
Installing collected packages: pytz, Django Successfully installed
Django-2.0.4 pytz-2018.4

(Foo-oXnKEj-P) [user@host Foo]$
2 of 3
1

You can also use poetry with local poetry.toml config

[virtualenvs]
in-project = true
🌐
Reddit
reddit.com › r/learnpython › python equivalent of `npm install` for a given directory/project?
r/learnpython on Reddit: Python equivalent of `npm install` for a given directory/project?
October 18, 2017 -

in js/node for any given project you include a package.json file and when the command npm install is run in that directory it will install all of the required libraries/dependencies listed in package.json (as new packages/libraries are installed they're automatically included in package.json).

Is there a python equivalent to this? If I move my project to a new machine, I'd like to install all of the project requirements in a single command, is this possible?

Thanks.

🌐
Four Kitchens
fourkitchens.com › home › how to write maintainable python packages (for node.js developers)
How to Write Maintainable Python Packages (for Node.js Developers)
April 19, 2023 - A package manager or repository, like NPM or PyPi, uses a package manifest to publish information about your package and to enable other people to install and use your package in their own projects.
🌐
Medium
medium.com › @maw1a › writing-a-package-manager-for-python-a1acf6698a11
Writing a package manager for Python | by Ahmed Mawia | Medium
October 31, 2024 - Writing a package manager for Python pyp — a package manager inspired by npm, but for Python Like any developer with too much free time on their hands, I found myself one evening thinking “Hey …
🌐
DuBlog
dublog.net › blog › so-many-python-package-managers
Python has too many package managers
July 7, 2024 - There is effectively no standard way to enumerate the dependencies of a given package nor how to setup tools like linters and tests. In 2020 PEP 621 was accepted. This proposal effectively gives a guidance to consolidate everything into a pyproject.toml file, almost identical to Cargo.toml in Rust and similar to the package.json used in npm. Naturally this led to a proliferation of new Python package managers which leverage the new standard.
🌐
KDnuggets
kdnuggets.com › top-7-python-package-managers
Top 7 Python Package Managers - KDnuggets
October 27, 2025 - Poetry is a dependency and packaging tool that simplifies project management in Python. It manages virtual environments, resolves dependencies, and handles publishing seamlessly, all through a single configuration file called pyproject.toml. Poetry is popular among software engineers because it provides them with greater control over their Python projects. To install, please enter the following command in your terminal: curl -sSL https://install.python-poetry.org | python3 -
🌐
Stack Overflow
stackoverflow.com › questions › 58147272 › a-better-python-package-manager
packaging - A better Python package manager - Stack Overflow
So what package managers exist that meet some or all of my requiments? Or what workarounds are available to me that would meet my requirements? ... Pipenv is in my opinion close to something like npm. Although, I am not sure if it can run scripts.
🌐
GitHub
github.com › orgs › pnpm › discussions › 3164
pnpm for Python · pnpm · Discussion #3164
A lot of the newer Python package managers are emulating npm. pipenv is one of the newer package managers, but its incredibly slow and people are now moving away from it to an even newer one called poetry. It seems that they are many years behind all the R&D that has gone into JS package managers like yarn and pnpm.
🌐
Built In
builtin.com › software-engineering-perspectives › package-managers
How to Choose Between Package Managers: Maven, Gradle and More | Built In
April 26, 2022 - Some package managers — like Maven, npm, NuGet and Gradle — install dependencies for specific projects and programming languages, while other package managers like Homebrew target specific operating systems.
🌐
Python Packaging
packaging.python.org › tutorials › managing-dependencies
Managing Application Dependencies — Python Packaging User Guide
If you’re familiar with Node.js’ npm or Ruby’s bundler, it is similar in spirit to those tools. While pip alone is often sufficient for personal use, Pipenv is recommended for collaborative projects as it’s a higher-level tool that simplifies dependency management for common use cases. ... This does a user installation to prevent breaking any system-wide packages...
🌐
The New Stack
thenewstack.io › home › how to choose the best python package management tool
How To Choose the Best Python Package Management Tool - The New Stack
June 16, 2025 - Pip, UV and Poetry are three distinct Python package management solutions, each one tailored to different development needs.