Search code examples
pythonpython-3.xpipfile-rename

How do I stop opening a .whl file with the notepad?


I have accidentally changed my Pygame .whl to open with the notepad. This means I get this error when trying to install the Pygame.

I tried, hopelessly, typing ".whl" at the end of the file when renaming, however it did not work.

C:\Users\ronald>cd Downloads

C:\Users\ronald\Downloads>pip install pygame-1.9.4-cp37-cp37m-win32.whl
WARNING: Requirement 'pygame-1.9.4-cp37-cp37m-win32.whl' looks like a filename, but the file does not exist
Processing c:\users\ronald\downloads\pygame-1.9.4-cp37-cp37m-win32.whl
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\ronald\\Downloads\\pygame-1.9.4-cp37-cp37m-win32.whl'

Solution

  • The actual path is most likely pygame-1.9.4-cp37-cp37m-win32.whl.txt

    What you need to do is remove the .txt but you most likely have file name extensions unchecked so you can't just rename the file.

    In windows explorer you need to click on the View tab then mark the check box that says File name extensions. This will show the file extensions on all files and allow you to change them.

    After that just remove the .txt and you should be good!