Python Forum

Full Version: SSD and HDD
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello ! I need help (please ! ) from experienced users.

I will try to summarize my problem briefly. If my request is "stupid", I humbly apologize:

In my computer I have two disks: an SSD and an HDD. Windows is installed on the SSD, and I do not have much additional memory. It is an SSD which is starting to date a bit (2017) and therefore, I do not want to destroy it with writes / rewrites.

I managed to "install" Python on the HDD, without too much problem, to install Anaconda on the HDD without too much problem, but I still have quite a few writes on the SSD, in AppData / Roaming for example, or I have a ".anaconda" folder, a "jupyter" folder and a "python38" folder. I didn't have much time to look at what was in it, and I'm not sure I would have understood anyway. I am new to the Python ecosystem.

In short, here is my "question": I would like to know if you knew a procedure to install "properly" Python, and the tools which can accompany it (Anaconda, JupyterLab, Pip), on the HDD and limit as much as possible the writes on the SSD?

Thanking you.

(please excuse my english please it is not my native language.)

  1. Create a new user account (offline, no MS-Account)
  2. Login into your new account
  3. Logout from your new account
  4. Login into your admin user account
  5. Go to location: C:\Users\
  6. Move the new crated home directory of the new user to another location / disk (admin rights are required to move it)
  7. Start regedit and navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\
  8. Navigate in this hierarchy to the last folders and the right side you'll see ProfileImagePath which is pointing to the users home directory. Change this path to the new location. Don't edit the wrong user. You
    ll have minimum 2 long entries after you've added the new user in previous step.
  9. Log out and log in with the new user.

[attachment=992]

I've tested this on a Virtual Machine where Windows 10 is installed.
This procedure does affect only one profile and does not affect other profiles.

It is possible to change the location of all profiles, but this not what you want.

After you've done everything, you could use this user, to install everything in %LOCALAPPDIR%.
Newer installers support both methods. The first well-known method is to install an application system wide in "C:\Programm files".
The newer method is to install the application inside the users profile.

I'm not sure if Anaconda offers the Application install in users profile, but if not, you can choose another directory on drive D.

My source: https://answers.microsoft.com/en-us/wind...95193a440f

PS: Deleting the new created user after the change is also possible and it works fine. So after the test I remove the user xy.
Thanks so much, i will quickly try it come back here to confirm that it worked.

I got a problem.

I followed all the steps without any problem, but at the seventh step, I can't find HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft Windows\CurrentVersion\ProfileList.
More exactly, there is not "ProfileList" in the "CurrentVersion" directory.

I will retry it, but if you have any idea, I'm listening !
My fault, it's in Microsoft\Windows NT and not in Microsoft Windows.
I'll correct the first post. I did not copy the text, I typed it manually because I was sitting in front of two different computers. One with Windows, one with Ubuntu Linux.
Once again, thank you very much.

So, I will re-formulate to be sure that I have understood everything :
After i've done everything to create the new user and move it in my HDD, I can install Python, anaconda and jupyterLab on the new user session.
This will "automaticaly" install the things on the HDD (if I choose correctly the install directory), and then, I could access it from my admin session ?
Maybe, from my admin session, I will must set the environment variables, like "python_home", to make it pointing on the directory where I have installed python, etc ?
(Sep-17-2020, 09:32 AM)UldSKull Wrote: [ -> ]After i've done everything to create the new user and move it in my HDD, I can install Python, anaconda and jupyterLab on the new user session.

But don't forget to correct the path to the new location of the new user home directory.
So first move the user, then edit the profile location with regedit.

Quote:This will "automaticaly" install the things on the HDD (if I choose correctly the install directory), and then, I could access it from my admin session ?

If it's a user application installation,it goes automatically to %LOCALAPPDATA%\Programs\
The %LOCALAPPDATA%\Programs points to the %USERPROFILE%\AppData\Local\Programs

The older method of installers are doing a system wide installation.
This allows you to choose manually an installation path. The most applications offers this old method.
Some newer, like Python, offers both types of installation.

In general applications saving data to %LOCALAPPDATA%.
This is why anaconda put's the cache of pip into your profile directory.
After the change it's still the same, but then ther user profile directory is in another location.

Quote:Maybe, from my admin session, I will must set the environment variables, like "python_home", to make it pointing on the directory where I have installed python, etc ?

This is a bit of guessing. I don't use anaconda, but I guess it installs also the py.exe system wide, which looks at all known locations for Python interpreters. It should find Interpreters in "C:\Program files" and "%LOCALAPPDATA%\Programs\".

If you type py -0 in your Windows terminal, it should list different versions or just one version of Python.
It depends on how much you've installed. Adding python.exe to the PATH can make trouble if different versions are installed.

Maybe anaconda is too big for you. Are you sure that you need all packages?
I've done everything you said, and it worked.

sorry I am dumb : I installed Anaconda on the "new user" session, and I wonder how can I access it from my admin session.

Maybe it is impossible ? Maybe I didn't understand what you meant and explained me ?

I want to run "anaconda navigator", I searched for a navigator.exe in the anaconda install folder, double clicked on it, and nothing happened..

i apologize for the inconvenience