Virtualenv: "main.py" gives error but "python main.py" works perfectly fine
Question: I created a new virtualenv to test fuzzywuzzy. I activate my env and "pip
install fuzzywuzzy"

I create a file "main.py" with the following code:

    
    
    from fuzzywuzzy import fuzz
    
    r = fuzz.ratio("this is a test", "this is a test!")
    
    print(r)
    

Back to the console, I activate the env and enter "main.py":

    
    
    (fuzzytest) C:\Users\Family\Desktop\fuzzytest>main.py
    Traceback (most recent call last):
      File "C:\Users\Family\Desktop\fuzzytest\main.py", line 1, in <module>
        from fuzzywuzzy import fuzz
    ImportError: No module named 'fuzzywuzzy'
    

BUT if I do "python main.py":

    
    
    (fuzzytest) C:\Users\Family\Desktop\fuzzytest>python main.py
    97
    

It works fine. Why is that? Am I doing anything wrong?


Answer: Try starting the script with `#! /usr/bin/env python`.

This is supposed to work on windows according to the [python
docs](https://docs.python.org/3.3/using/windows.html#shebang-lines).

