0

我正在尝试在 Hyper-V 中的 Ubuntu 18.04 VM 上安装 The Littlest JupyterHub。

我在 Hyper-V 中创建了一个外部(桥接)网络,以便我可以从同一网络上的笔记本电脑访问它。我想测试 JupyterHub 处理断开的网络连接的能力。

我认为安装程序在尝试升级版本时失败,conda但日志不是很清楚。我做错了什么,还是有安装程序错误?

multipass launch bionic --name jupyterhub --cpus 2 --mem 3G --network "name=HyperV External Switch"
multipass shell jupyterhub
sudo apt update
sudo apt install python3-venv python3-dev python3-pip git curl
curl -L https://tljh.jupyter.org/bootstrap.py | sudo -E python3 - --admin jhadmin
ubuntu@jupyterhub:~$ curl -L https://tljh.jupyter.org/bootstrap.py | sudo -E python3 - --admin jhadmin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 10949  100 10949    0     0  16148      0 --:--:-- --:--:-- --:--:-- 16148
Checking if TLJH is already installed...
Setting up hub environment
Installed python & virtual environment
Set up hub virtual environment
Setting up TLJH installer...
Upgraded pip
Setup tljh package
Starting TLJH installer...
Setting up admin users
Granting passwordless sudo to JupyterHub admins...
Setting up user environment...
Downloading & setting up user environment...
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 442, in <module>
    main()
  File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 416, in main
    ensure_user_environment(args.user_requirements_txt_url)
  File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/installer.py", line 192, in ensure_user_environment
    'conda==' + conda_version
  File "/opt/tljh/hub/lib/python3.6/site-packages/tljh/conda.py", line 108, in ensure_conda_packages
    ] + packages).decode()
  File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/opt/tljh/user/bin/python', '-m', 'conda', 'install', '-c', 'conda-forge', '--json', '--prefix', '/opt/tljh/user', 'conda==4.8.1']' returned non-zero exit status 1.
ubuntu@jupyterhub:~$ conda
conda: command not found
ubuntu@jupyterhub:~$ ls /opt/tljh/user/bin/
2to3      bsdcpio  bzcmp    bzgrep        bzmore      clear      deactivate    infocmp    lz4cat  lzegrep  lzma      ncursesw6-config  pydoc3    python3-config    python3.7m-config  sqlite3           tclsh8.6  tqdm    unxz    wish8.6      xz     xzdiff   xzless   zstdmt
2to3-3.7  bsdtar   bzdiff   bzip2         c_rehash    conda      easy_install  infotocap  lzcat   lzfgrep  lzmadec   openssl           pydoc3.7  python3.7         pyvenv             sqlite3_analyzer  tic       tset    unzstd  xml2-config  xzcat  xzegrep  xzmore
activate  bunzip2  bzegrep  bzip2recover  captoinfo   conda-env  idle3         lz4        lzcmp   lzgrep   lzmainfo  pip               python    python3.7-config  pyvenv-3.7         tabs              toe       unlz4   wheel   xmlcatalog   xzcmp  xzfgrep  zstd
bsdcat    bzcat    bzfgrep  bzless        chardetect  cph        idle3.7       lz4c       lzdiff  lzless   lzmore    pydoc             python3   python3.7m        reset              tclsh             tput      unlzma  wish    xmllint      xzdec  xzgrep   zstdcat
ubuntu@jupyterhub:~$ /opt/tljh/user/bin/conda --version
conda 4.7.10
ubuntu@jupyterhub:~$ /opt/tljh/user/bin/python -m conda install -c conda-forge --json --prefix /opt/tljh/user conda==4.8.1
{
  "caused_by": "FileExistsError(17, 'File exists')",
  "errno": 17,
  "error": "NotWritableError: The current user does not have write permissions to a required path.\n  path: /home/ubuntu/.conda/pkgs/urls.txt\n  uid: 1000\n  gid: 1000\n\nIf you feel that permissions on this path are set incorrectly, you can manually\nchange them by executing\n\n  $ sudo chown 1000:1000 /home/ubuntu/.conda/pkgs/urls.txt\n\nIn general, it's not advisable to use 'sudo conda'.\n",
  "exception_name": "NotWritableError",
  "exception_type": "<class 'conda.exceptions.NotWritableError'>",
  "gid": 1000,
  "message": "The current user does not have write permissions to a required path.\n  path: /home/ubuntu/.conda/pkgs/urls.txt\n  uid: 1000\n  gid: 1000\n\nIf you feel that permissions on this path are set incorrectly, you can manually\nchange them by executing\n\n  $ sudo chown 1000:1000 /home/ubuntu/.conda/pkgs/urls.txt\n\nIn general, it's not advisable to use 'sudo conda'.\n",
  "path": "/home/ubuntu/.conda/pkgs/urls.txt",
  "uid": 1000
}

ubuntu@jupyterhub:~$ sudo /opt/tljh/user/bin/python -m conda install -c conda-forge --json --prefix /opt/tljh/user conda==4.8.1
{
  "caused_by": "MemoryError()",
  "error": "CondaMemoryError: The conda process ran out of memory. Increase system memory and/or try again.",
  "exception_name": "CondaMemoryError",
  "exception_type": "<class 'conda.exceptions.CondaMemoryError'>",
  "message": "The conda process ran out of memory. Increase system memory and/or try again."
}
4

0 回答 0