Unable to use any EE command after upgrade

Hi, A couple of days ago, I did an update to EE and now I get this error on any EE commands. How do I fix this? Can you please help?

ee clean
Traceback (most recent call last):
  File "/usr/local/bin/ee", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2927, in <module>
    @_call_aside
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 635, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'python-apt' distribution was not found and is required by ee

Likely a reinstall of EE will fix this issue.

wget -qO ee rt.cx/ee && sudo bash ee

I guess you upgraded the version of Debian or Ubuntu?

I tried that too. More errors now. I think python version got messed up?

ImportError: No module named 'DistUtilsExtra'
[ Fri Jul 22 17:01:06 EDT 2016 ] Unable to install EasyEngine, exit status  1
Updating Nginx configuration, please wait...
no crontab for root
Updating WP-CLI version to resolve compatibility issue.
Traceback (most recent call last):
  File "/usr/local/bin/ee", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2927, in <module>
    @_call_aside
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 635, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.4/site-packages/pkg_resources/__init__.py", line 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'python-apt' distribution was not found and is required by ee

For EasyEngine (ee) auto completion, run the following command

source /etc/bash_completion.d/ee_auto.rc

EasyEngine (ee) installed/updated successfully
EasyEngine (ee) help: http://docs.rtcamp.com/easyengine/

If you recently updated OS it seems like the best scenario is to update EE first and then update OS.

I was facing similar issue with Ubunto 12 to 14 upgrade, but I did this on a test server so no harm was done. I just cloned my live server to test server again and this time updated EE first and then updated Ubuntu, no issues.