Python Anaconda 创建环境(代理集):无效的 IPv6 URL
Python Anaconda Create Environment (proxy set): Invalid IPv6 URL
我刚刚在我的 Windows 7 机器上安装了 Anaconda。我现在正在尝试建立一个虚拟环境来为我的项目工作。我认为我已经解决的第一个问题是 .conarc 文件中的代理设置。我是按照以下对问题 的回答中的说明进行操作的。但是,当我尝试创建一个新环境时,我现在 运行 进入以下错误消息 "Invalid IPv6 URL"。谁能建议如何解决这个问题?
以下错误报告的副本:
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", lin
e 1062, in __call__
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main.py", line
84, in _main
exit_code = do_call(args, p)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\conda_argparse.
py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main_create.py"
, line 37, in execute
install(args, parser, 'create')
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\install.py", li
ne 256, in install
force_reinstall=context.force_reinstall or context.force,
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 112, in solve_for_transaction
force_remove, force_reinstall)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 150, in solve_for_diff
force_remove)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 249, in solve_final_state
ssc = self._collect_all_metadata(ssc)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\common\io.py", line
88, in decorated
return f(*args, **kwds)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 389, in _collect_all_metadata
index, r = self._prepare(prepared_specs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 974, in _prepare
self.subdirs, prepared_specs, self._repodata_fn)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\index.py", lin
e 214, in get_reduced_index
repodata_fn=repodata_fn)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 91, in query_all
result = tuple(concat(executor.map(subdir_query, channel_urls)))
File "C:\ProgramData\Anaconda3\lib\concurrent\futures\_base.py", line 586,
in result_iterator
yield fs.pop().result()
File "C:\ProgramData\Anaconda3\lib\concurrent\futures\_base.py", line 432,
in result
return self.__get_result()
File "C:\ProgramData\Anaconda3\lib\concurrent\futures\_base.py", line 384,
in __get_result
raise self._exception
File "C:\ProgramData\Anaconda3\lib\concurrent\futures\thread.py", line 57,
in run
result = self.fn(*self.args, **self.kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 87, in <lambda>
package_ref_or_match_spec))
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 96, in query
self.load()
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 160, in load
_internal_state = self._load()
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 234, in _load
repodata_fn=self.repodata_fn)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 471, in fetch_repodata_remote_request
timeout=timeout)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", li
ne 546, in get
return self.request('GET', url, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", li
ne 533, in request
resp = self.send(prep, **send_kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", li
ne 646, in send
r = adapter.send(request, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\adapters.py", li
ne 412, in send
conn = self.get_connection(request.url, proxies)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\adapters.py", li
ne 304, in get_connection
proxy = prepend_scheme_if_needed(proxy, 'http')
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\utils.py", line
895, in prepend_scheme_if_needed
scheme, netloc, path, params, query, fragment = urlparse(url, new_scheme
)
File "C:\ProgramData\Anaconda3\lib\urllib\parse.py", line 368, in urlparse
splitresult = urlsplit(url, scheme, allow_fragments)
File "C:\ProgramData\Anaconda3\lib\urllib\parse.py", line 432, in urlsplit
raise ValueError("Invalid IPv6 URL")
ValueError: Invalid IPv6 URL
`$ C:\ProgramData\Anaconda3\Scripts\conda-script.py create --name py37 python=3.
7`
environment variables:
CIO_TEST=<not set>
CONDA_DEFAULT_ENV=base
CONDA_EXE=C:\ProgramData\Anaconda3\condabin\..\Scripts\conda.exe
CONDA_EXES="C:\ProgramData\Anaconda3\condabin\..\Scripts\conda.ex
e"
CONDA_PREFIX=C:\ProgramData\Anaconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=C:\ProgramData\Anaconda3\python.exe
CONDA_ROOT=C:\ProgramData\Anaconda3
CONDA_SHLVL=1
HOMEPATH=\Users\a08056114
PATH=C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Libr
ary\mingw-w64\bi
n;C:\ProgramData\Anaconda3\Library\usr\bin;C:\ProgramD
ata\Anaconda3\Li
brary\bin;C:\ProgramData\Anaconda3\Scripts;C:\ProgramD
ata\Anaconda3\bi
n;C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Li
brary\mingw-w64\
bin;C:\ProgramData\Anaconda3\Library\usr\bin;C:\Progra
mData\Anaconda3\
Library\bin;C:\ProgramData\Anaconda3\Scripts;C:\Progra
mData\Anaconda3\
bin;C:\ProgramData\Anaconda3\condabin;C:\WINDOWS\syste
m32;C:\WINDOWS;C
:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPow
erShell\v1.0;C:\
WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\Sys
tem32\WindowsPow
erShell\v1.0;C:\WINDOWS\System32\WindowsPowerShell\v1.
0;C:\WINDOWS\Sys
tem32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\Windo
wsPowerShell\v1.
0;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Progra
m Files
(x86)\Enterprise Vault\EVClient;C:\Program Files
(x86)\OpenText\Viewer\bin;C:\Program Files (x86)\Sennh
eiser\SoftphoneS
DK;C:\Users\a08056114\Documents\Software\snap\bin
PLMVIS_82_LIBPATH=C:\Program Files (x86)\SAP\FrontEnd\SAPgui\Program
PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\
system32\Windows
PowerShell\v1.0\Modules
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : base
active env location : C:\ProgramData\Anaconda3
shell level : 1
user config file : C:\Users\a08056114\.condarc
populated config files : C:\Users\a08056114\.condarc
conda version : 4.7.10
conda-build version : 3.18.8
python version : 3.7.3.final.0
virtual packages : __cuda=7.0
base environment : C:\ProgramData\Anaconda3 (read only)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\ProgramData\Anaconda3\pkgs
C:\Users\a08056114\.conda\pkgs
C:\Users\a08056114\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\a08056114\.conda\envs
C:\ProgramData\Anaconda3\envs
C:\Users\a08056114\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.7.10 requests/2.22.0 CPython/3.7.3 Windows/7 W
indows/6.1.7601
administrator : False
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?
[y/N]:
以防对其他人有帮助。我发现代理实际上没有设置正确,这仍然是问题的原因。它设置不正确的原因是因为我的密码中有字符#。一旦我更改了密码以删除所有的#,它就起作用了。
我刚刚在我的 Windows 7 机器上安装了 Anaconda。我现在正在尝试建立一个虚拟环境来为我的项目工作。我认为我已经解决的第一个问题是 .conarc 文件中的代理设置。我是按照以下对问题
以下错误报告的副本:
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\exceptions.py", lin
e 1062, in __call__
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main.py", line
84, in _main
exit_code = do_call(args, p)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\conda_argparse.
py", line 82, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\main_create.py"
, line 37, in execute
install(args, parser, 'create')
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\cli\install.py", li
ne 256, in install
force_reinstall=context.force_reinstall or context.force,
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 112, in solve_for_transaction
force_remove, force_reinstall)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 150, in solve_for_diff
force_remove)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 249, in solve_final_state
ssc = self._collect_all_metadata(ssc)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\common\io.py", line
88, in decorated
return f(*args, **kwds)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 389, in _collect_all_metadata
index, r = self._prepare(prepared_specs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\solve.py", lin
e 974, in _prepare
self.subdirs, prepared_specs, self._repodata_fn)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\index.py", lin
e 214, in get_reduced_index
repodata_fn=repodata_fn)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 91, in query_all
result = tuple(concat(executor.map(subdir_query, channel_urls)))
File "C:\ProgramData\Anaconda3\lib\concurrent\futures\_base.py", line 586,
in result_iterator
yield fs.pop().result()
File "C:\ProgramData\Anaconda3\lib\concurrent\futures\_base.py", line 432,
in result
return self.__get_result()
File "C:\ProgramData\Anaconda3\lib\concurrent\futures\_base.py", line 384,
in __get_result
raise self._exception
File "C:\ProgramData\Anaconda3\lib\concurrent\futures\thread.py", line 57,
in run
result = self.fn(*self.args, **self.kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 87, in <lambda>
package_ref_or_match_spec))
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 96, in query
self.load()
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 160, in load
_internal_state = self._load()
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 234, in _load
repodata_fn=self.repodata_fn)
File "C:\ProgramData\Anaconda3\lib\site-packages\conda\core\subdir_data.py
", line 471, in fetch_repodata_remote_request
timeout=timeout)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", li
ne 546, in get
return self.request('GET', url, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", li
ne 533, in request
resp = self.send(prep, **send_kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\sessions.py", li
ne 646, in send
r = adapter.send(request, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\adapters.py", li
ne 412, in send
conn = self.get_connection(request.url, proxies)
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\adapters.py", li
ne 304, in get_connection
proxy = prepend_scheme_if_needed(proxy, 'http')
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\utils.py", line
895, in prepend_scheme_if_needed
scheme, netloc, path, params, query, fragment = urlparse(url, new_scheme
)
File "C:\ProgramData\Anaconda3\lib\urllib\parse.py", line 368, in urlparse
splitresult = urlsplit(url, scheme, allow_fragments)
File "C:\ProgramData\Anaconda3\lib\urllib\parse.py", line 432, in urlsplit
raise ValueError("Invalid IPv6 URL")
ValueError: Invalid IPv6 URL
`$ C:\ProgramData\Anaconda3\Scripts\conda-script.py create --name py37 python=3.
7`
environment variables:
CIO_TEST=<not set>
CONDA_DEFAULT_ENV=base
CONDA_EXE=C:\ProgramData\Anaconda3\condabin\..\Scripts\conda.exe
CONDA_EXES="C:\ProgramData\Anaconda3\condabin\..\Scripts\conda.ex
e"
CONDA_PREFIX=C:\ProgramData\Anaconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=C:\ProgramData\Anaconda3\python.exe
CONDA_ROOT=C:\ProgramData\Anaconda3
CONDA_SHLVL=1
HOMEPATH=\Users\a08056114
PATH=C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Libr
ary\mingw-w64\bi
n;C:\ProgramData\Anaconda3\Library\usr\bin;C:\ProgramD
ata\Anaconda3\Li
brary\bin;C:\ProgramData\Anaconda3\Scripts;C:\ProgramD
ata\Anaconda3\bi
n;C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Li
brary\mingw-w64\
bin;C:\ProgramData\Anaconda3\Library\usr\bin;C:\Progra
mData\Anaconda3\
Library\bin;C:\ProgramData\Anaconda3\Scripts;C:\Progra
mData\Anaconda3\
bin;C:\ProgramData\Anaconda3\condabin;C:\WINDOWS\syste
m32;C:\WINDOWS;C
:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPow
erShell\v1.0;C:\
WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\Sys
tem32\WindowsPow
erShell\v1.0;C:\WINDOWS\System32\WindowsPowerShell\v1.
0;C:\WINDOWS\Sys
tem32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\Windo
wsPowerShell\v1.
0;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Progra
m Files
(x86)\Enterprise Vault\EVClient;C:\Program Files
(x86)\OpenText\Viewer\bin;C:\Program Files (x86)\Sennh
eiser\SoftphoneS
DK;C:\Users\a08056114\Documents\Software\snap\bin
PLMVIS_82_LIBPATH=C:\Program Files (x86)\SAP\FrontEnd\SAPgui\Program
PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\
system32\Windows
PowerShell\v1.0\Modules
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : base
active env location : C:\ProgramData\Anaconda3
shell level : 1
user config file : C:\Users\a08056114\.condarc
populated config files : C:\Users\a08056114\.condarc
conda version : 4.7.10
conda-build version : 3.18.8
python version : 3.7.3.final.0
virtual packages : __cuda=7.0
base environment : C:\ProgramData\Anaconda3 (read only)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\ProgramData\Anaconda3\pkgs
C:\Users\a08056114\.conda\pkgs
C:\Users\a08056114\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\a08056114\.conda\envs
C:\ProgramData\Anaconda3\envs
C:\Users\a08056114\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.7.10 requests/2.22.0 CPython/3.7.3 Windows/7 W
indows/6.1.7601
administrator : False
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?
[y/N]:
以防对其他人有帮助。我发现代理实际上没有设置正确,这仍然是问题的原因。它设置不正确的原因是因为我的密码中有字符#。一旦我更改了密码以删除所有的#,它就起作用了。