conda:如何在线转换频道 URL
conda: how to turn channel URLs online
为了完成我的学士论文,我必须使用 conda for ArcGIS Pro,但我是个菜鸟。
当我尝试安装新软件包或什至只是克隆环境时,我会收到错误消息。例如:
(arcgispro-py3) F:\Programme\ArcGIS\bin\Python\envs\arcgispro-py3>conda create --name deeplearning --clone arcgispro-py3
Source: F:\Programme\ArcGIS\bin\Python\envs\arcgispro-py3
Destination: F:\Programme\ArcGIS\bin\Python\envs\deeplearning
Packages: 126
Files: 16
CondaError: RuntimeError('EnforceUnusedAdapter called with url https://conda.anaconda.org/esri/win-64/arcgispro-2.5-0.tar.bz2\nThis command is using a remote connection in offline mode.\n',)
CondaError: RuntimeError('EnforceUnusedAdapter called with url https://conda.anaconda.org/esri/win-64/arcgispro-2.5-0.tar.bz2\nThis command is using a remote connection in offline mode.\n',)
CondaError: RuntimeError('EnforceUnusedAdapter called with url https://conda.anaconda.org/esri/win-64/arcgispro-2.5-0.tar.bz2\nThis command is using a remote connection in offline mode.\n',)
通过 conda info
我发现我所有的频道 URL 都设置为离线。我想我的问题来自那个问题。所以:我怎样才能让他们再次上线?
我多次尝试重新安装 ArcGIS 和所有相关程序,但没有帮助。
康达信息:
(arcgispro-py3) F:\Programme\ArcGIS\bin\Python\envs\arcgispro-py3>conda info
Current conda install:
platform : win-64
conda version : 4.3.27
conda is private : False
conda-env version : 4.3.27
conda-build version : 3.18.9
python version : 3.6.8.final.0
requests version : 2.22.0
root environment : F:\Programme\ArcGIS\bin\Python (writable)
default environment : F:\Programme\ArcGIS\bin\Python\envs\arcgispro-py3
envs directories : F:\Programme\ArcGIS\bin\Python\envs
C:\Users\Niko\AppData\Local\ESRI\conda\envs
C:\Users\Niko\.conda\envs
package cache : C:\Users\Niko\AppData\Local\ESRI\conda\pkgs
F:\Programme\ArcGIS\bin\Python\pkgs
channel URLs : https://repo.anaconda.com/pkgs/main/win-64 (offline)
https://repo.anaconda.com/pkgs/main/noarch (offline)
https://repo.anaconda.com/pkgs/free/win-64 (offline)
https://repo.anaconda.com/pkgs/free/noarch (offline)
https://repo.anaconda.com/pkgs/r/win-64 (offline)
https://repo.anaconda.com/pkgs/r/noarch (offline)
https://repo.anaconda.com/pkgs/msys2/win-64 (offline)
https://repo.anaconda.com/pkgs/msys2/noarch (offline)
https://github.com/mstamy2/PyPDF2/win-64 (offline)
https://github.com/mstamy2/PyPDF2/noarch (offline)
https://conda.anaconda.org/new_channel/win-64 (offline)
https://conda.anaconda.org/new_channel/noarch (offline)
https://conda.anaconda.org/esri/win-64 (offline)
https://conda.anaconda.org/esri/noarch (offline)
config file : F:\Programme\ArcGIS\bin\Python\.condarc
netrc file : None
offline mode : True
user-agent : conda/4.3.27 requests/2.22.0 CPython/3.6.8 Windows/10 Windows/10.0.18362
administrator : False
尝试使用 conda config --set offline false
将离线模式设置为 false 无效。该命令只是被忽略了。
修复:
命令 conda config --set offline false
在基础环境中工作。
您似乎已经在 Anaconda Navigator 中触发了离线模式(参见Offline Mode documentation),它可以根据是否检测到互联网连接进行切换。 . 它也可以从命令行手动切换,例如,你可以禁用它:
conda config --set offline false
为了完成我的学士论文,我必须使用 conda for ArcGIS Pro,但我是个菜鸟。 当我尝试安装新软件包或什至只是克隆环境时,我会收到错误消息。例如:
(arcgispro-py3) F:\Programme\ArcGIS\bin\Python\envs\arcgispro-py3>conda create --name deeplearning --clone arcgispro-py3
Source: F:\Programme\ArcGIS\bin\Python\envs\arcgispro-py3
Destination: F:\Programme\ArcGIS\bin\Python\envs\deeplearning
Packages: 126
Files: 16
CondaError: RuntimeError('EnforceUnusedAdapter called with url https://conda.anaconda.org/esri/win-64/arcgispro-2.5-0.tar.bz2\nThis command is using a remote connection in offline mode.\n',)
CondaError: RuntimeError('EnforceUnusedAdapter called with url https://conda.anaconda.org/esri/win-64/arcgispro-2.5-0.tar.bz2\nThis command is using a remote connection in offline mode.\n',)
CondaError: RuntimeError('EnforceUnusedAdapter called with url https://conda.anaconda.org/esri/win-64/arcgispro-2.5-0.tar.bz2\nThis command is using a remote connection in offline mode.\n',)
通过 conda info
我发现我所有的频道 URL 都设置为离线。我想我的问题来自那个问题。所以:我怎样才能让他们再次上线?
我多次尝试重新安装 ArcGIS 和所有相关程序,但没有帮助。
康达信息:
(arcgispro-py3) F:\Programme\ArcGIS\bin\Python\envs\arcgispro-py3>conda info
Current conda install:
platform : win-64
conda version : 4.3.27
conda is private : False
conda-env version : 4.3.27
conda-build version : 3.18.9
python version : 3.6.8.final.0
requests version : 2.22.0
root environment : F:\Programme\ArcGIS\bin\Python (writable)
default environment : F:\Programme\ArcGIS\bin\Python\envs\arcgispro-py3
envs directories : F:\Programme\ArcGIS\bin\Python\envs
C:\Users\Niko\AppData\Local\ESRI\conda\envs
C:\Users\Niko\.conda\envs
package cache : C:\Users\Niko\AppData\Local\ESRI\conda\pkgs
F:\Programme\ArcGIS\bin\Python\pkgs
channel URLs : https://repo.anaconda.com/pkgs/main/win-64 (offline)
https://repo.anaconda.com/pkgs/main/noarch (offline)
https://repo.anaconda.com/pkgs/free/win-64 (offline)
https://repo.anaconda.com/pkgs/free/noarch (offline)
https://repo.anaconda.com/pkgs/r/win-64 (offline)
https://repo.anaconda.com/pkgs/r/noarch (offline)
https://repo.anaconda.com/pkgs/msys2/win-64 (offline)
https://repo.anaconda.com/pkgs/msys2/noarch (offline)
https://github.com/mstamy2/PyPDF2/win-64 (offline)
https://github.com/mstamy2/PyPDF2/noarch (offline)
https://conda.anaconda.org/new_channel/win-64 (offline)
https://conda.anaconda.org/new_channel/noarch (offline)
https://conda.anaconda.org/esri/win-64 (offline)
https://conda.anaconda.org/esri/noarch (offline)
config file : F:\Programme\ArcGIS\bin\Python\.condarc
netrc file : None
offline mode : True
user-agent : conda/4.3.27 requests/2.22.0 CPython/3.6.8 Windows/10 Windows/10.0.18362
administrator : False
尝试使用 conda config --set offline false
将离线模式设置为 false 无效。该命令只是被忽略了。
修复:
命令 conda config --set offline false
在基础环境中工作。
您似乎已经在 Anaconda Navigator 中触发了离线模式(参见Offline Mode documentation),它可以根据是否检测到互联网连接进行切换。 . 它也可以从命令行手动切换,例如,你可以禁用它:
conda config --set offline false