Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python equivalent of node.js's npm link to use local development versions of requirements?

In Node.js, I'm used to using npm link to get a project to use a custom version of a dependency. From the Node documentation:

First, npm link in a package folder will create a globally-installed symbolic link from prefix/package-name to the current folder.

Next, in some other location, npm link package-name will create a symlink from the local node_modules folder to the global symlink.

Is it kosher to do something similar by symlinking into site-packages?

like image 530
btown Avatar asked Oct 01 '13 18:10

btown


People also ask

What is the equivalent of npm in Python?

I've found a very good equivalent for npm, It's called pipenv. It handles both virtualenv and pip requirements at the same time so it's more like npm.

What is the Python equivalent of package json?

Note that the equivalent of npm package. json is the PipFile file!

Can I use npm instead of pip?

It is the package installer for Python. You can use pip to install packages from the Python Package Index and other indexes. npm and pip can be categorized as "Front End Package Manager" tools. npm is an open source tool with 17.2K GitHub stars and 3.17K GitHub forks.

Can npm install Python packages?

npm allows installing packages globally or local to a project. In pip , all packages are installed globally. To separate the local dependencies from system-wide packages, a virtual environment is created which contains all the dependencies local to the project and even a local Python distribution.


1 Answers

The exact analogue is pip install -e . or python setup.py develop.

https://pip.pypa.io/en/latest/reference/pip_install.html#editable-installs

like image 139
Colonel Panic Avatar answered Oct 05 '22 16:10

Colonel Panic