News for hackers. Stuff that matters.
Re:Shell Scripting with Elixir by gkbrk on Tuesday February 13, 2024 @09:49AM (#39358077)
That's not Python syntax. It's a Jupyter extension.
Re:Shell Scripting with Elixir by behnamoh on Tuesday February 13, 2024 @09:53AM (#39358119)
Right, but Python can run command line code in subprocesses too, so it should be possible to run a pip install jupyter command inside Python.
Re:Shell Scripting with Elixir by networked on Wednesday February 14, 2024 @08:11AM (#39369386)
The problem is that installing dependencies for the user or globally will lead to version conflicts. You need a separate virtual environment or a custom installation directory for each script to avoid conflicts. There are script runners and copy-pastable code snippets for Python that handle this by creating the virtual environment and installing the dependencies in it. Check out https://github.com/stars/dbohdan/lists/python-scripts-with-d... (disclosure: my list, and it includes my repository).
Re:Shell Scripting with Elixir by behnamoh on Thursday February 15, 2024 @12:12AM (#39379351)
Thanks, I checked out the link, it's quite handy!