Answers for "pip install dependencies of package"

1

python pip install all dependencies

# Let's assume that your Python script is example.py:
import os
import time
import sys
import fnmatch
import requests
import urllib.request
from bs4 import BeautifulSoup
from multiprocessing.dummy import Pool as ThreadPool 
print('test')
# You can use pipreqs to automatically generate a requirements.txt file based on the import statements that the Python script(s) contain. To use pipreqs, assuming that you are in the directory where example.py is located:

pip install pipreqs
pipreqs .
#It will generate the following requirements.txt file:

requests==2.23.0
beautifulsoup4==4.9.1
#which you can install with:

pip install -r requirements.txt
Posted by: Guest on January-02-2022
-1

how to install dependencies python

# Use PowerShell, Bash, CMD, etc.
pip install foo-pkg

# Automatically installs dependencies!
Posted by: Guest on January-21-2021

Code answers related to "pip install dependencies of package"

Python Answers by Framework

Browse Popular Code Answers by Language