Unable to install/update the packages in deeplearing.ai labs

I encountered some challenges while attempting to install a package from PyPI, specifically langchain-community. Here are the warnings and errors I received during the process:

Defaulting to user installation because normal site-packages is not writeable
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fbb1a821490>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/langchain-community/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fbb1a821760>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/langchain-community/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fbb1a8218e0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/langchain-community/

Has anyone else encountered similar issues, or have other suggestions for resolving this? Any insights or shared experiences would be greatly appreciated!

Edit: This issue is not specific to langchain-community; it can occur with any package installation using pip install.

1 Like

Are you facing the error every time you use pip install command? Try with pip3 install comand too.

Maybe that is due to your internet connection or proxy error.

I found this on GitHub that might solve: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")' · Issue #7424 · pypa/pip · GitHub

So, here are a few things to check if that doesn’t work:

  1. Try restarting your computer
  2. On/off VPN if you use
  3. Try with different internet connection if you can

Thanks for the reply @sithu.

Apparently the pip install <package_name> command was working just fine across all short course on the DeepLearning.ai platform a day ago or so. Not sure what happed…

1 Like

I think you don’t need to install/update the default packages in DeepLearing.AI labs.

So, try with pip show langchain-community to check your package version. If your version is the same with the course, no need to update it.

btw, did you also try restarting your notebook as it said?

1 Like

@sithu

Yes I tried restarting but it didn’t help. Actually langchain-community package is not required for the course but I wanted to so do some experimentation using from langchain_community.document_loaders import YoutubeLoader function.

Not sure why pip install suddenly stopped working as it was working just fine a day ago .

Edit_1: I did some digging and it look like pip install command is working when in case of the following short course Quantization In Depth by Huggingface.

However in case of the course functions-tools-agents-langchain it doesn’t seem to work?

Edit_2: Actually pip install command throws the same error across all of the Langchain courses. Is this on purpose or is it a bug?

1 Like

I don’t have access to the contents. Maybe our fellow mentors @TMosh, @Girijesh , and @Deepti_Prasad could have some thoughts in this. Or maybe @Community-Team might has.

1 Like

I’m not involved in the Short Courses.

1 Like

@Girijesh @Deepti_Prasad @Community-Team.

Any updates on this??

1 Like

hi @Mubin_Manasiya @sithu

your error log is related to network issue, also check if you have any antivirus in your system, this could be also the reason. Sharing a similar issue thread, it should help you (check your settings) also make sure you are not using any proxy server

Regards
DP

Dear @Mubin_Manasiya,

Please try following command
!python -m pip3 install --upgrade pip
or
!python -m pip install --upgrade pip

And let me know the outcome.