Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Won't install on Ubuntu 16.04 #186

Closed
gsportelli opened this issue Sep 21, 2018 · 5 comments
Closed

Won't install on Ubuntu 16.04 #186

gsportelli opened this issue Sep 21, 2018 · 5 comments
Labels
good first issue Good for newcomers needs-documentation Issue that can be solved with documentation

Comments

@gsportelli
Copy link

I'm trying to install tljh in Ubuntu 16.04, but I get the following error:

Checking if TLJH is already installed...
TLJH already installed, upgrading...
Upgrading TLJH installer...
Setup tljh package
Starting TLJH installer...
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 174, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.5/runpy.py", line 144, in _get_module_details
    code = loader.get_code(mod_name)
  File "<frozen importlib._bootstrap_external>", line 767, in get_code
  File "<frozen importlib._bootstrap_external>", line 727, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/opt/tljh/hub/lib/python3.5/site-packages/tljh/installer.py", line 326
    raise FileExistsError(f'/usr/bin/tljh-config exists but is not a symlink to {tljh_config_src}')
                                                                                             ^
SyntaxError: invalid syntax

I see that the offending line uses a string feature ('f' prefix) that is not available in python 3.5, which is the most recent python in Ubuntu 16.04.

@fomightez
Copy link
Contributor

Per https://the-littlest-jupyterhub.readthedocs.io/en/latest/:

"The Littlest JupyterHub (TLJH) can run on any server that is running at least Ubuntu 18.04. We have a bunch of tutorials to get you started."

Or...
I had hit the same thing when I tried a couple of weeks ago before Amazon added a standard Ubuntu 18.04 to the Quick-start listing. I had considered forking and editing the f-string use out. You could try that. I decided against it figuring I'd probably hit another road block since clearly the documentation had been changed to move to Ubuntu 18 even though within the bootstrap script, it still references Ubuntu 16, specifically it reads, "Be compatible with Python 3.4 (since we support Ubuntu 16.04). Alternatively, there is a way to make f-strings work in older Python versions, see here.

I had also made a quick pass at updating Python on the Ubuntu 16.04-based cloud machine I was using but for some reason it continued to still use 3.5 because I probably had something not updated in a correct path. This another work-around you could consider if you cannot use Ubuntu 18.04.

@go-bears
Copy link

go-bears commented Oct 8, 2018

the installation docs say the specs require Ubuntu 18.04; I don't believe Ubuntu 16 is supported by TLJH
https://the-littlest-jupyterhub.readthedocs.io/en/latest/

But AWS does have a Free Tier eligible Ubuntu Server 18.04 LTS server available. If the option doesn't show up in the quick start choices, you just need to search for the option in the search bar when you launch an instance.

@willingc willingc added good first issue Good for newcomers needs-documentation Issue that can be solved with documentation labels Oct 8, 2018
@willingc
Copy link
Contributor

willingc commented Oct 8, 2018

Update the README.md and docs/index.rst to bold the requirement Ubuntu 18.04.

Search the docstrings of the source code and update reference to Ubuntu 16 to 18.04.

go-bears added a commit to go-bears/the-littlest-jupyterhub that referenced this issue Oct 9, 2018
add clarity to installation directions
go-bears added a commit to go-bears/the-littlest-jupyterhub that referenced this issue Oct 9, 2018
@olivierverdier
Copy link

I have managed to install TLJH on Ubuntu 16.04. The only thing you have to do is to start the bootstrapping with a more recent version than the one provided in Ubuntu. For instance, install Python using an anaconda distribution. Then, modify the bootstrap.py script so that it uses that Python executable instead. For instance by applying the patch here: olivierverdier@0be5725

In short, the only reason that 16.04 is not supported is that the bootstrap script uses the system python of Ubuntu. Use a more recent one instead, and everything works, as far as I can see.

@olivierverdier
Copy link

I have now made a full branch for installation on Ubuntu 16.04. There were a few more things to tweak to make it work completely. Here is the branch: https://github.com/olivierverdier/the-littlest-jupyterhub/tree/ubuntu-16-04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers needs-documentation Issue that can be solved with documentation
Projects
None yet
Development

No branches or pull requests

5 participants