Pip install -r requirements.txt

Error with:

Python Library Dependencies

Please advise.

Once the Python 3 environment is activated, we need to install our python dependencies. These dependencies are defined in the requirements.txt file, and can be installed with the following command:

pip install -r requirements.txt

This error occurs mostly if your internet connection quality is not reliable.

You can pass additional parameter --default-timeout=1000 on your pip command to increase the request/response timeout.

pip install -r requirements.txt --default-timeout=1000

1 Like

Thanks , but I still have the issue as displayed. Can i add a parameter to the command. I run the PIP command from the Windows 10 cmd … line

db = g._database = MongoClient(
MFLIX_DB_URI,
# TODO: Connection Pooling
# Set the maximum connection pool size to 50 active connections.
# TODO: Timeouts
# Set the write timeout limit to 2500 milliseconds.
)[MFLIX_DB_NAME]
return db

Hi @abzz,

I think maybe your firewall is blocking the pypi package server.

It’s better that you download and install the python packages manually.

  1. Go to the https://pypi.org/ site.

  2. Search for the package which you want to install (Example: pymongo)

  1. IMPORTANT: Select the official driver from the list. This is usually the first search result, but verify once.

  1. Click on Download files button on the left.

  1. Download the file matching your OS, your system bit ( x86/ x64 ), the python version which you have installed and the package version which is mentioned in the requirements.txt file provided by MongoDB University.

    Example: If you have Windows 10, 64-bit, python 3.7 and the pymongo version required is pymongo 3.9, then you should download the file pymongo-3.9.0-cp37-cp37m-win_amd64.whl

  1. Install the package using the command pip install <DOWNLOADED_FILE.whl>
    Example: pip install pymongo-3.9.0-cp37-cp37m-win_amd64.whl

  2. Repeat the process for all the other packages mentioned in the requirements.txt file.

1 Like

hi,

All the labs so far have worked out, so i am accessing the database. Is there anyway that I can just enhance the command.
db = g._database = MongoClient(
MFLIX_DB_URI,

TODO: Connection Pooling

Set the maximum connection pool size to 50 active connections.

TODO: Timeouts

Set the write timeout limit to 2500 milliseconds.

)[MFLIX_DB_NAME]
return db

Thanks !

Please pardon the bold an enlarged case, just a typo, sorry.

Hi !

Unfortunately this did not work out, it came up with a message already loaded.

Thanks,

Ajai