Related files are also present in directories not installed in Anaconda

Asked 2 years ago, Updated 2 years ago, 151 views

I installed Anaconda in a directory called E: ¥anaconda3.
Navigator and prompt were saved in that directory, but the following files that might be related were saved under C: ousers 。
.conda
.continuum
.ipython
.keras
.matplotlib
.spyder-py3
I would like to have the anaconda related to drive E, but is it inevitable that these will be installed on C?
Also, is there any other solution besides reinstalling?
I've never done PATH manually on Windows, so if I have no choice, could you tell me more about it?

python matplotlib anaconda keras

2022-09-30 19:40

1 Answers

There was an explanation that could be changed at first, but there seems to be no example of it.
Furthermore, there is a file called .condarc that is referenced earlier than this, and it is unlikely that the location of the file can be changed.
Also, .anaconda and AppData seem to have directories further down.

  • .conda

I couldn't find any information after a short search.

  • .continuum

There are three explanations that can be done by setting environment variables:

  • .ipython
  • .keras
  • .matplotlib

The following .spier-py3 seems to have been discussed, but it has not yet been implemented.

  • .spyder-py3

If you use more things like Jupiter-Lab/Notebook, you will need more settings.

About .conda

It seems that the article around here explains it, but there are some examples of standard settings, but there are no examples of changes, and there seems to be no search.
Using the.condarconda configuration file
Administrating a multi-user conda installation
conda configuration

The commands to display the configuration are conda info and conda config --show, and it seems that there are other folders.
Here's an excerpt.(Information from C:\Anaconda3 installation in All Users)

active env location:C:\Anaconda3

       user config file:C:\Users\UserName\.condarc
 populated config files:C:\Users\UserName\.condarc

       base environment: C:\Anaconda3 (writable)
      conda av data dir: C:\Anaconda3\etc\conda

          package cache:C:\Anaconda3\pkgs
                          C:\Users\UserName\.conda\pkgs
                          C:\Users\UserName\AppData\Local\conda\conda\pkgs
       envs directories:C:\Anaconda3\envs
                          C:\Users\UserName\.conda\envs
                          C:\Users\UserName\AppData\Local\conda\conda\envs

You can find an explanatory article about common settings and changes other than those directories.
Anaconda Memorandum
List of commands commonly used in Anaconda
AnHow to use Anaconda よくList of common conda commands チCheat Sheet <

By the way, to move the Anaconda directory, it seems that the procedure is to save the environment → uninstall → reinstall → restore the environment.
Moving Anaconda from one directory to another
Managing environmentsIncludes saving and restoring
Uninstalling Anaconda
Installation

About .ipython

If you set the directory to the environment variable IPYTHONDIR as shown below, you will be able to do it.

Overview of the IPython configuration system

  • If the ipython-dir command line flag is given, its value is used.
  • If not, the value returned by IPython.paths.get_ipython_dir()is used.This function will first look at the IPYTHONDIRenvironment variable and then default to ~/.ipython.Historical support_dir>IPYRode

For most users, the configuration directory will be to /.ipython.

About .keras

If you set the directory to the environment variable KERAS_BACKEND as shown below, it will be possible.

Keras backs

Switch backend
Once you run Keras at least, you'll find the Keras configuration file below.

$HOME/.keras/keras.json

If you don't have this file there, you can create it.
For Windows users, change $HOME to %USERPROFILE%.

You can also define the environment variable KERAS_BACKEND and overwrite what is defined in your configuration file:

About .matplotlib

If you set the directory to the environment variable MPLCONFIGDIR as shown below, you will be able to do it.

matplotlib configuration and cache directory locations

On Unix-like systems, this directory is generically located in your HOME directory under the.config/directory.
Addition, users have a cache directory.On Unix-like systems, this is separate from the configuration directory by default.Tolocate your.cache/directory, use matplotlib.get_cachedir():

If you would like to use a different configuration directory, you can do so by specifying the location in your MPLCONFIGDIR environment variable --see Setting environment variables in Linux and macOS.Note that MPLCONFIGDIR the location of the location

Environment variables

MPLCONFIGDIR
This is the directory used to store user customizations to Matplotlib, as well as some caches to improve performance.If MPLCONFIGDIR is not defined, HOME/.config/matplotlib and HOME/.cache/matplotlib and HOME/mputlib is used to find a base directory in which the matplotlib subdirectory is created.

About .spyder-py3

As discussed in this issue, the situation has not progressed much.
Set the path of Spyder Configuration Folder#4150

The following is a technical response to changing the USERPROFILE environment variable only when starting Spyder, but I am not sure if it can be used to start from Anaconda Navigator.
Here's how to run spyder in portable mode in Windows without changing the code:

However, even though you can change the directory, it is highly likely that they will not work properly because the rewritten USERPROFILE will be used when debugging scripts and launching tools from Spyder.


2022-09-30 19:40

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.