Conda工作正常,但无法创建虚拟环境

时间:2019-05-10 07:22:56

标签: python anaconda conda

我在使用Conda设置虚拟环境时遇到问题。尝试conda --version之类的命令时,Conda正在运行(我想)。 但是当我尝试conda create -n mynewenv python=2.7时,下面出现错误。

Traceback (most recent call last):
  File "/opt/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 1003, in __call__
    return func(*args, **kwargs)
  File "/opt/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 74, in _main
    from ..base.context import context
  File "/opt/anaconda3/lib/python3.6/site-packages/conda/base/context.py", line 30, in <module>
    from ..common._os.linux import linux_get_libc_version
ModuleNotFoundError: No module named 'conda.common._os.linux'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/anaconda3/bin/conda", line 13, in <module>
    sys.exit(main())
  File "/opt/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 150, in main
    return conda_exception_handler(_main, *args, **kwargs)
  File "/opt/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 1291, in conda_exception_handler
    return_value = exception_handler(func, *args, **kwargs)
  File "/opt/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 1006, in __call__
    return self.handle_exception(exc_val, exc_tb)
  File "/opt/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 1050, in handle_exception
    return self.handle_unexpected_exception(exc_val, exc_tb)
  File "/opt/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 1061, in handle_unexpected_exception
    self.print_unexpected_error_report(error_report)
  File "/opt/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 1116, in print_unexpected_error_report
    from .base.context import context
  File "/opt/anaconda3/lib/python3.6/site-packages/conda/base/context.py", line 30, in <module>
    from ..common._os.linux import linux_get_libc_version
ModuleNotFoundError: No module named 'conda.common._os.linux'

我尝试并在线搜索了涉及所述模块conda.common._os.linux的错误,但找不到任何错误。我想知道在哪里可以获取此模块,或者应该重新配置conda?该服务器当前正在使用Python 3.6.7和Conda 4.6.14。

更新

显然,conda无法正常工作。我收到与其他其他conda参数(例如infolist)相同的错误消息。唯一有效的参数是-h-V,用于检查帮助消息和版本检查。如何重新配置​​conda?这是在共享服务器上。

0 个答案:

没有答案