If you want to relocate or move the location of your pyxll.xll file you will need to first un-install the PyXLL add-in from Excel, move the PyXLL files, and then re-install the PyXLL add-in in Excel.
- Uninstall the PyXLL add-in.
In Excel go to Options -> Add-Ins -> Manage Excel Add-Ins. Unselect the PyXLL add-in, and completely close all running instances of Excel.
Important: Check there are no other open Excel sessions as Excel has the strange behavior that it remembers the add-ins from the last open Excel instance. If you have another Excel instance running with PyXLL loaded, and you close that after removing PyXLL from another instance, Excel will still remember it which can be very confusing! If in doubt, close all Excel sessions, open one new one, remove the add-in, and then close that session. - Move the PyXLL add-in files.
When moving, ensure all files including the config file (pyxll.cfg) are moved. Your Python modules and other files can be referenced using a relative path in your config file, and so if you are doing that you will need to move your Python files too, or change your config. - Re-Install the PyXLL add-in.
Start Excel again (since in 1. you completely closed Excel). The PyXLL add-in should no longer be loaded now when you start Excel.
Install the moved pyxll.xll add-in from the new location via Options -> Add-Ins -> Manage Excel Add-Ins.
Tip: If you are ever unsure about where Excel is loading PyXLL from, go to Add-Ins -> PyXLL -> About. For older versions of PyXLL that don't show this information in the about screen, go to Options -> Add-Ins and you will be able to see the path of the add-in there.