jupyterhub / the-littlest-jupyterhub

Simple JupyterHub distribution for 1-100 users on a single server
https://tljh.jupyter.org
BSD 3-Clause "New" or "Revised" License
1.03k stars 339 forks source link

Installation problem - pip upgrade #836

Closed cwood1967 closed 1 year ago

cwood1967 commented 1 year ago

Bug description

I am trying to install TLJH, can after running curl -L https://tljh.jupyter.org/bootstrap.py | sudo -E /usr/bin/python3 - --admin

It creates the /opt/tljh directory, and directories inside, but when trying to upgrade pip, it crashes with:

Existing TLJH installation not detected, installing...
Setting up hub environment...
Installing Python, venv, pip, and git via apt-get...
Setting up virtual environment at /opt/tljh/hub
Upgrading pip...
Ran /opt/tljh/hub/bin/pip install --upgrade pip==21.3.* with exit code 2
Exception:
Traceback (most recent call last):
  File "/opt/tljh/hub/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/opt/tljh/hub/lib/python3.6/site-packages/pip/commands/install.py", line 290, in run
    with self._build_session(options) as session:
  File "/opt/tljh/hub/lib/python3.6/site-packages/pip/basecommand.py", line 69, in _build_session
    if options.cache_dir else None
  File "/usr/lib/python3.6/posixpath.py", line 80, in join
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not int

Traceback (most recent call last):
  File "<stdin>", line 473, in <module>
  File "<stdin>", line 444, in main
  File "<stdin>", line 162, in run_subprocess
subprocess.CalledProcessError: Command '['/opt/tljh/hub/bin/pip', 'install', '--upgrade', 'pip==21.3.*']' returned non-zero exit status 2.

Expected behaviour

I thought the installation would finish.

Actual behaviour

The installation stopped with an error

How to reproduce

follow the installation instructions

Your personal set up

welcome[bot] commented 1 year ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

manics commented 1 year ago
  File "/opt/tljh/hub/lib/python3.6/site-packages/pip/basecommand.py", line 69, in _build_session
    if options.cache_dir else None
  File "/usr/lib/python3.6/posixpath.py", line 80, in join
    a = os.fspath(a)

It looks like two different Python distributions are getting confused with each other. Could you try reproducing this on a fresh VM? What customisations do you have on your workstation, compared with a clean installation?

cwood1967 commented 1 year ago

Thanks for the quick response. I will try to track that down and try on a VM.

consideRatio commented 1 year ago

I'll go for a close as I see no clear actionable followup. Note that we have also now recently stopped pinning the pip version.