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

Consider automating the creation of the Python version used #1854

Open
nolangormley opened this issue May 31, 2023 · 5 comments
Open

Consider automating the creation of the Python version used #1854

nolangormley opened this issue May 31, 2023 · 5 comments
Labels
documentation Improvements or additions to documentation good first issue good independent project Priority-P3 Extremely optional; new opportunity or work area refactor Long-term projects to revise existing machinery

Comments

@nolangormley
Copy link
Contributor

Currently, running these indicators requires that you have Python3.8 installed locally. As 3.8 is a fairly old version, it is no longer in the standard Ubuntu libraries and needs to be installed from binaries. We should consider new options that allow us to make this easier in the future.

One proposed option would be to have a script in the root directory that will download and install the python3.8 binaries like this

At the very least we should have some build instructions in the main readme about this requirement.

@nolangormley nolangormley added documentation Improvements or additions to documentation refactor Long-term projects to revise existing machinery good first issue Priority-P3 Extremely optional; new opportunity or work area good independent project labels May 31, 2023
@dshemetov
Copy link
Contributor

Installing Python in 2023 feels so janky. FWIW, I heard deadsnakes is a well-maintained PPA for this. I think it's legit.

Also, an alternative may be to bump our Python version to 3.9 or 3.10, here. I don't think there's much backwards incompatibility in these versions.

@nolangormley
Copy link
Contributor Author

I did try the deadsnakes ppa, not sure if I just flubbed something but I still couldn't get 3.8 through term.

I usually use Pyenv to manage Python versions, but didn't have it configured on my laptop. Do you use a solution like that when you run these indicators locally?

@dshemetov
Copy link
Contributor

Dang, that's too bad. I haven't actually tried deadsnakes, only read about it recently. And yea, I'm still using pyenv, it just feels so jank having to install a third-party tool, mess with your .zshrc or whatever, and then install Python.

@nolangormley
Copy link
Contributor Author

Agree. Not sure if there's an elegant solution tbh, just thought I would put this issue up to console my 20 minutes of frustration lol

@krivard
Copy link
Contributor

krivard commented Jun 2, 2023

Settling on a new version of python is a big lift we should be prepared to dedicate serious time toward it if we find surprises.

In the meantime, pyenv looks to be the way people manage multiple weird versions of python these days. I think we use it in our prod systems as well. May be worth converting the docs and indicator build scripts to use it?

A sketch of the changes needed might look like this:

getting started guide

  1. install pyenv for your OS: https://github.com/pyenv/pyenv#installation

Makefile

venv:

  1. use pyenv to check whether 3.8 is installed
  2. if not, pyenv install 3.8
  3. use pyenv to switch to 3.8 before creating the new environment

& then I think all targets that source env/bin/activate should just... work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue good independent project Priority-P3 Extremely optional; new opportunity or work area refactor Long-term projects to revise existing machinery
Projects
None yet
Development

No branches or pull requests

3 participants