Question: For some reason I'm getting this error:

> 
> Uncaught ReferenceError: $stateProvider is not defined
> 
> 
> 

even though `angular-ui-router.js` is being loaded fine.

Here is my code 

```
(function () {
    var mod = angular.module('MyApp', ['ui.router']);
    debugger;
    mod.config(['$stateProvider', '$locationProvider', function ($stateProvider, $locationProvider) {
        $stateProvider.state('product', {
            url: "/home/product",
            views: {
                "view1": {
                    templateUrl: "/Angular/Components/Products/Products.html",
                    controller: "Ctr_Products",
                }
            }
        });

    $locationProvider.html5Mode({
        enabled: true, requireBase: false
    });
}]);

```

Answer: 
I had a similar problem, when doing apt-get upgrade... The problem is that apt-get was trying to use python2.7, but the symlink was pointing to python3.4: 

```
debian:/usr/bin# cat /etc/debian_version
8.10
debian:/usr/bin# ll /usr/bin/python
lrwxrwxrwx 1 root root 18 Feb 26 17:02 /usr/bin/python -> /usr/bin/python3.4

```

Fixed it by creating a new symlink 

```
debian:/usr/bin# rm /usr/bin/python
debian:/usr/bin# ln -s /usr/bin/python2.7 /usr/bin/python

```
Install python-dev module for specific version of python:

```
sudo apt install python3.6-dev

```