Quantcast
Channel: Install a package and write to requirements.txt with pip - Stack Overflow
Browsing latest articles
Browse All 4 View Live

Answer by William Boman for Install a package and write to requirements.txt...

I've written the following bash function which I use;function pip-save() { for pkg in $@; do pip install "$pkg"&& { name="$(pip show "$pkg" | grep Name: | awk '{print $2}')"; version="$(pip...

View Article


Answer by dusktreader for Install a package and write to requirements.txt...

To get the version information, you can actually use pip freeze selectively after install. Here is a function that should do what you are asking for:pip_install_save() { package_name=$1...

View Article


Answer by MechanisM for Install a package and write to requirements.txt with pip

Just add smth likefunction pips() { echo $'\n'$1 >> requirements.txt; pip install $1}into your .bashrc or .bash_profile and use pips command to install package and save it's name into...

View Article

Install a package and write to requirements.txt with pip

I'm searching for a way to install a package with pip, and write that package's version information to my project's requirements.txt file. For those familiar with npm, it's essentially what npm install...

View Article
Browsing latest articles
Browse All 4 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>