Bash script not sourcing

Advertisements In my folder where I keep my other bash scripts, I have created this one: #! /bin/bash source $(poetry env info –path)/bin/activate In a file named poetry_activate. In a bash terminal, the autocomplete works, and when I enter poetry_activate, the virtual environment is not loaded… However, if I do source $(poetry env info –path)/bin/activate… Read More Bash script not sourcing

How do I run poetry install in a subprocess without reference to the current virtualenv?

Advertisements I am writing some auto setup code in a command line tool that we have. This command line tool is installed with poetry, so when someone is invoking the command line tool, it is from within a virtual environment setup by poetry. The command I am trying to invoke is poetry install for another… Read More How do I run poetry install in a subprocess without reference to the current virtualenv?

Can I get Poetry to reinstall ipykernel after installing ipywidgets?

Advertisements I’m developing a Python package. I used Poetry to set up my development environment; I intend to distribute my code through PyPI. One of my dependencies requires ipywidgets<7.7.2, as documented here. Due to a bug (mentioned here), ipykernel must be reinstalled after ipywidgets is installed. This SO answer says that developers can’t specify the… Read More Can I get Poetry to reinstall ipykernel after installing ipywidgets?

Pip install a package in a way that it gets not listed in requirements.txt

Advertisements Is it possible to install a pip package in a way so that it gets not listed when doing pip freeze > requirements.txt? I am thinkging of an equivalent to: poetry add –dev which adds (installs) a package as a development dependency, but it does not appear in dependency list. Is there a way… Read More Pip install a package in a way that it gets not listed in requirements.txt

Why can't I install a Python package with the Python requirement ">=3.8,<3.11" into a Poetry project with the Python version "^3.9"?

Advertisements I’m having an issue installing dependencies into my Poetry project. If I run poetry new (as described in https://python-poetry.org/docs/basic-usage/), I can create a new project: $ poetry new scipy-test Created package scipy_test in scipy-test My project structure looks like this after I delete a few files not needed for this reproduction: $ tree .… Read More Why can't I install a Python package with the Python requirement ">=3.8,<3.11" into a Poetry project with the Python version "^3.9"?

Poetry Error: Not enough arguments (missing: "path")

Advertisements I had poetry running smoothly till yesterday with 1.1.13 version on Python 3.10.4 installed via pyenv Today I updated poetry with the command poetry self update Now after setting poetry config virtualenvs.in-project true When I try to create a new project poetry new –src It keeps giving me this error Not enough arguments (missing:… Read More Poetry Error: Not enough arguments (missing: "path")

Python Poetry specify dependency on `sentry-sdk[flask]`

Advertisements I’m trying to add support for Sentry to an existing Python Flask application that uses Python Poetry for dependency management. The Sentry docs say to run this: pip install –upgrade ‘sentry-sdk[flask] That works. But I want to convert that into a pyproject.toml dependency entry for Python Poetry. If I try just this: [tool.poetry.dependencies] #… Read More Python Poetry specify dependency on `sentry-sdk[flask]`