6

I am running Ubuntu 20.04 in WSLg under a Windows 11 insider build (build 22523). When I do certain Python-related things, I keep getting these two warnings:

/home/eafpres/.local/lib/python3.8/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.23ubuntu1 is an invalid version and will not be supported in a future release
  warnings.warn(
/home/eafpres/.local/lib/python3.8/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.36ubuntu1 is an invalid version and will not be supported in a future release
  warnings.warn(

For example, I just did: pip install plotly

and got these, but the install worked fine. Similarly, I get them when I start my IDE (Spyder).

Is there something wrong with my Ubuntu install?

Kevin Bowen
  • 20,055
  • 57
  • 82
  • 84
eafpres
  • 71

3 Answers3

3

Rename the .local/lib/python3.8/site-packages/pkg_resources folder to pkg_resources_back. After that, all warnings should be gone.

pip list should also work, but you need check if other things work as well.

Michał
  • 31
1

This module is installed as part of setuptools. You can uninstall setuptools to remove this package if you don't need it.

It is very possible that there is another setuptools from the Ubuntu repo installed in your system (it is version 45.2 in Ubuntu 20.04 currently). You can confirm that by running:

apt list | grep setuptools

If not, you may install this setuptools instead, which should be more compatible with your Ubuntu system, if that outdated version fits you.

Wei
  • 111
  • 1
0

You are not doing anything wrong. These warnings are caused by not PEP 440 compliant versions of those Python packages. These Ubuntu package versions need to be fixed: https://launchpad.net/bugs/1991606