Skip to content

spyder settings location #1995

@RedAero

Description

@RedAero

I just installed the brand new WinPython64-3.14.3.0slim.exe alongside my older, WinPython64-3.13.7.0slim, and I can't for the life of me get the new version to read spyder's settings from the same location that the old version wrote them to, namely %USERPROFILE%\.spyder-py3.

I had made the old version registered and fixed (i.e. I ran wppm --register and wppm --fix), I undid that now (ran wppm --unregister and wppm --movable) and made the new one registered and fixed, and the registering worked, but the settings are still read from the local WPy64-3.14.3.0\settings directory. The two winpython.ini files under \settings\ are identical except for the new PYTHONIOENCODING line, and I changed nothing in them from the default. Running the new spyder.exe immediately creates the local settings files and such.

I tried changing winpython.ini, both by changing [inactive_environment_common] to [active_environment_common] and by just uncommenting USERPROFILE = %HOME% in the env.bat section (I did not run any batch files manually by the way), both result in Spyder starting as before with the local/portable settings but the iPython console within now throws an error:

Traceback (most recent call last):
File "C:\Users\redacted\Documents\Work\Progs\WPy64‑3.14.3.0\python\Lib\site‑packages\spyder\plugins\ipythonconsole\widgets\main_widget.py", line 1464, in _connect_new_client_to_kernel
kernel_spec.env = future.result()
^^^^^^^^^^^^^^^
File "C:\Users\redacted\Documents\Work\Progs\WPy64‑3.14.3.0\python\Lib\site‑packages\spyder\plugins\ipythonconsole\utils\kernelspec.py", line 275, in env
env_vars["tmp"] = GetShortPathName(env_vars["tmp"])
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
pywintypes.error: (2, 'GetShortPathNameW', 'The system cannot find the file specified.')

Changing SPYDER_CONFDIR = %HOME%\settings\.spyder-py3 to SPYDER_CONFDIR = %USERPROFILE%\.spyder-py3 did the trick, but why did the older version not require this change?


Speaking of winpython.ini, is this line correct?
## <?> changing this segment to [inactive_environment_common] makes this segment of lines active
Inactive (which is what it is by default) is active?

And while we're on the subject, I don't even understand the USERPROFILE = %HOME% line to begin with, %HOME% does not exist as an environment variable, so what is USERPROFILE being set to?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions