Anaconda安装指向网络驱动器作为主文件夹-无法启动Spyder和Anaconda Navigator [英] Anaconda Installation points to network drive as home folder - cannot start Spyder and Anaconda Navigator
问题描述
在安装Anaconda 4.3.1之后,Spyder和Anaconda Navigator无法运行.当通过Anaconda Prompt尝试使用Anaconda-navigator时,最终错误提示:
After installing Anaconda 4.3.1, Spyder and Anaconda Navigator do not run. When trying anaconda-navigator through the Anaconda Prompt, I get as an end error:
binstar_client.errors.BinstarError:O ::系统找不到指定的路径
binstar_client.errors.BinstarError: O:: The system cannot find the path specified
conda配置--show:
conda config --show:
(C:\Anaconda3) C:\Windows\system32>conda config --show
add_anaconda_token: True
add_pip_as_python_dependency: True
allow_softlinks: True
always_copy: False
always_softlink: False
always_yes: False
auto_update_conda: True
binstar_upload: None
changeps1: True
channel_alias: https://conda.anaconda.org
channel_priority: True
channels:
- defaults
client_ssl_cert:
client_ssl_cert_key:
create_default_packages: []
debug: False
default_channels:
- https://repo.continuum.io/pkgs/free
- https://repo.continuum.io/pkgs/r
- https://repo.continuum.io/pkgs/pro
- https://repo.continuum.io/pkgs/msys2
disallow: []
envs_dirs:
- C:\Anaconda3\envs
- C:\Users\Geo01\AppData\Local\conda\conda\envs
- O:\.conda\envs
json: False
offline: False
proxy_servers: {}
quiet: False
shortcuts: True
show_channel_urls: None
ssl_verify: True
track_features: []
update_dependencies: True
use_pip: True
verbosity: 0
所以问题似乎是在envs_dirs下我有一个O:\ .conda \ envs条目,并且它似乎被设置为Anaconda的主目录. O:是这台机器上的网络驱动器,我没有写权限. 我想从envs_dirs中删除该条目,但是不知何故.
So the problem seems to be that under envs_dirs I have an O:\ .conda\envs entry, and it seems to be set as the home directory for Anaconda. O: is a network drive on this machine, and I have no write permission on it. I want to remove this entry from envs_dirs, but somehow can't.
到目前为止,我已经尝试过但没有成功:
What I have tried so far and it has not worked:
-
在断开网络驱动器连接的情况下重新安装Anaconda仍会导致O:\为主驱动器
reinstalling Anaconda with the network drive disconnected still results in O:\ being the home drive
在没有自动PATH的情况下通过安装程序重新安装Anaconda,并在以后添加它
reinstalling Anaconda without automatic PATH through the installer and adding it later
使用管理员身份运行重新安装Anaconda
reinstalling Anaconda with Run as Administrator
conda配置删除键envs_dirs:
conda config remove-key envs_dirs :
CondaKeyError:密钥"envs_dirs"出错:密钥"envs_dirs"不在配置中 文件
CondaKeyError: Error with key 'envs_dirs': key 'envs_dirs' is not in the config file
设置CONDA_ENVS_PATH = C:\ Anaconda3 \ envs; C:\ Users \ Geo01 \ AppData \ Local \ conda \ conda \ envs
set CONDA_ENVS_PATH=C:\Anaconda3\envs;C:\Users\Geo01\AppData\Local\conda\conda\envs
将我创建的.condarc文件放在C:\ Anaconda3下,内容如下:
put a .condarc file of my creation under C:\Anaconda3 with the following contents:
envs_dirs:
envs_dirs:
-C:\ Anaconda3 \ envs
-C:\Anaconda3\envs
-C:\ Users \ Geo01 \ AppData \ Local \ conda \ conda \ envs
-C:\Users\Geo01\AppData\Local\conda\conda\envs
================================================ ===========
===========================================================
之前曾有人问过类似问题,但没有答案
A similar question has been asked before, with no answer, yet.
推荐答案
出现问题是因为将HOME和HOMEDRIVE python环境变量设置为O:.
Problem was occuring because the HOME and HOMEDRIVE python environmental variables were set to O:.
这可以由os.environ ['HOME']在计算机上的另一个python解释器中进行检查(在本例中为QGIS).
This could be checked by os.environ['HOME'] in another python interpreter on the computer (in this case, from QGIS).
我通过放置将其固定
import os
os.environ['HOME']='C:\\'
os.environ['HOMEDRIVE']='C:'
在spyder-script.py和anaconda-navigator-script.py的开头 在C:\ Anaconda3 \ Scripts
at the beginning of the spyder-script.py and anaconda-navigator-script.py under C:\Anaconda3\Scripts
这篇关于Anaconda安装指向网络驱动器作为主文件夹-无法启动Spyder和Anaconda Navigator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!