Trouble running code from Jupyter (name ‘pkg_resources’ is not defined)

  anaconda, jupyter, python, python-3.x, setuptools

I’m a statistician that is new to Python. I had written a Python program that worked successfully on my laptop, which recently had to be reformatted due an error in Windows.

My Python program was recovered and stored in a new folder, and the technicians also created a generic ‘User’ for Windows instead of the old account I used to have. Now, when I attempt to run this program — which was also retrieved and was stored in a new directory by the technicians — I get the following message:

NameError: name 'pkg_resources' is not defined 

I would appreciate any simple guidance as to whether I need to change directories, file names, or undertake other admin actions to get my code to work.See error here

Source: Python-3x Questions