如何阻止 Anaconda Navigator 和 Spyder 将库放入用户文件夹 [英] How to stop Anaconda Navigator and Spyder from dropping libraries into User folder

查看:28
本文介绍了如何阻止 Anaconda Navigator 和 Spyder 将库放入用户文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为参考,我想在多年后重新学习编程和 Python 基础知识.

For reference, I'm trying to re-learn programming and python basics after years away.

我最近下载了 Anaconda 作为在线 Python 课程的一部分.但是,每次我打开 Spyder 或导航器时,它们都会立即为我认为是 C:Users/Myself 中的所有相关库创建文件夹.其中包括 .conda、.anaconda、.ipython、.matplotlib、.config 和 .spyder-py3.

I recently downloaded Anaconda as part of an online Python Course. However, every time I open Spyder or the Navigator they instantly create folders for what I assume are all the relevant libraries in C:Users/Myself. These include .conda, .anaconda, .ipython, .matplotlib, .config and .spyder-py3.

我的目标是弄清楚如何更改这些文件的放置位置,以便我可以清理内容并获得更多控制权.但是,我不完全确定为什么会发生这种情况.我的假设是因为这是工作目录的默认位置,认为我所看到的解决方案目前在我之上.我希望这是一个具有更简单解决方案的单独问题,如果您对此有所了解,我们将不胜感激.

My goal is to figure out how change where these files are placed so I can clean things up and have more control. However, I am not entirely sure why this occurs. My assumption is it's due to that being the default location for the Working Directory, thought the solutions I've seen to that are currently above me. I'm hoping this is a separate issue with a simpler solution, and any light that can be shed on this would be appreciated.

推荐答案

转到:

~\anaconda3\Lib\site-packages\jupyter_core\paths.py

~\anaconda3\Lib\site-packages\jupyter_core\paths.py

在 def get_home_dir() 中:

in def get_home_dir():

您可以直接指定首选路径.

You can specify your preferred path directly.

其他 anaconda 应用程序可以通过这种方式进行修改,但您必须找出可以在哪些脚本中更改 homedir,有时它具有不同的名称.

Other anaconda applications can be mortified by this way but you have to find out in which scripts you can change the homedir, and sometimes it has different names.

这篇关于如何阻止 Anaconda Navigator 和 Spyder 将库放入用户文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆