Python Forum
How to re-register .py file extension to new moved Python dir (on Windows)?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to re-register .py file extension to new moved Python dir (on Windows)?
#1
Assume I installed Python v3.1.3 in the default installation directory

C:\Program Files\Python\

Now I decide to move this installation directory (without re-installlation) e.g. to

D:\devtools\Python\

Unfortunately simply moving the installation directory breaks the file associations.
The same applies when I want to use Pything from flash drive.

*.py file association still points to the old directory.
and Environment variable PATH still contains the old Python location too.

So how can I tell Python to re-register itself (for file associations and PATH) by using its current new directory?

Any solution for that?
Reply


Messages In This Thread
How to re-register .py file extension to new moved Python dir (on Windows)? - by pstein - Nov-04-2024, 12:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Create a new subclass in a Python extension based on an existing class voidtrance 6 1,379 Mar-25-2025, 06:37 PM
Last Post: voidtrance
  Can a windows file be 'remapped' in Linux ? jehoshua 3 891 Dec-07-2024, 03:33 AM
Last Post: jehoshua
  Executable file compiled by PyInstaller does not work on Windows 7 amusaber 1 1,804 Jul-11-2024, 02:59 PM
Last Post: DeaD_EyE
  Python C Extension Module loading issue on Cygwin mesibo 0 1,379 Sep-22-2023, 05:41 AM
Last Post: mesibo
  Pymodbus Write value to register stsxbel 10 13,932 Aug-18-2022, 01:42 PM
Last Post: DeaD_EyE
  Simple syntax to asynchronously get access to MODBUS register orion67 1 3,879 Jan-22-2022, 12:40 PM
Last Post: orion67
  batch file for running python scipt in Windows shell MaartenRo 2 3,046 Jan-21-2022, 02:36 PM
Last Post: MaartenRo
  Using a .bat file to execute simple anaconda commands in Windows 10 gacg1 0 5,793 Nov-30-2020, 03:24 PM
Last Post: gacg1
  Python broken if moved to a different folder ecastrotns 3 3,735 Oct-26-2020, 10:53 PM
Last Post: ecastrotns
  find file not knowing the extension Leon79 6 4,614 Jul-07-2020, 04:44 PM
Last Post: Leon79

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020