Installing Packages from Local Directory Using requirements.txt with Pip
In order to install packages using pip according to the requirements.txt file from a local directory, you can utilize the -r option. This option allows you to specify a requirements file that contains a list of packages and their dependencies. The syntax for using this option is as follows:
pip install -r /path/to/requirements.txt
In your case, the requirements file is located at /path/to/requirements.txt. However, you are also trying to install the packages from a local archive directory using the -f option. This is not necessary as the -r option will automatically install the packages from the specified location.
To correct the issue, simply remove the -f option from the command:
source bin/activate pip install -r /path/to/requirements.txt
This will install the packages according to the requirements.txt file from the local archive directory. You can then verify that the packages are installed properly by importing them into your code or checking the site-packages directory of your virtualenv.
以上是如何透過 Pip 使用 requests.txt 從本機目錄安裝軟體包?的詳細內容。更多資訊請關注PHP中文網其他相關文章!