python-poetry

How to check if a python package is installed using poetry

How to check if a python package is installed using poetry Question: I’m using Poetry to manage my Python project, and I would like to check if a package is installed. This means the package is actually fetched from the remote repository and is located in the .venv/ folder. I went through the official documentation …

Total answers: 3

Python poetry Failed to clone verify ref exists on remote

Python poetry Failed to clone verify ref exists on remote Question: I am using poetry 1.4.0 on ubuntu 22.04, and trying to add a specific git branch into my project : poetry add git+ssh://git@dev/home/git/projects/jaydebeapi#nanosecond_fix Failed to clone ssh://git@dev/home/git/projects/jaydebeapi at ‘nanosecond_fix’, verify ref exists on remote. This is strange because manual git clone works : git …

Total answers: 2

Create powershell environment variables with makefile, and accessing them with python os.environ

Create powershell environment variables with makefile, and accessing them with python os.environ Question: With VSCode, I’m accessing to a python project that have a makefile like this: VARIABLES = VAR1="text1" VAR2="text2" VAR3="text3" .PHONY: run run: $(VARIABLES) poetry run python -m start.app I am on a windows machine, with "make" installed on powershell by chocholately. Launching …

Total answers: 1

VSCode does not recognize my Flask dependency installed with Poetry

VSCode does not recognize my Flask dependency installed with Poetry Question: I am learning how to use VSCode for Python development by building a simple Flask app. I use Poetry for dependency management. I have a simple app.py where I’m importing flask and defining a basic route like so: from flask import Flask app = …

Total answers: 1

Error while installing jupyterlab with poetry

Error while installing jupyterlab with poetry Question: I can’t isntall JupyterLab with poetry. I keep getting this error. I’ve tried deleting cache by: rm -rf ~/Library/Caches/pypoetry/artifacts/* and poetry cache clear pypi –all but I keep getting the following error: $ poetry add –group dev jupyterlab Using version ^3.6.1 for jupyterlab Updating dependencies Resolving dependencies… (2.6s) …

Total answers: 2

Github Actions don't reuse cache

Github Actions don't reuse cache Question: I have a pretty simple step for CI on Github Actions, which is supposed to cache Python dependencies, so it would save a lot of computing time. some-step: name: ‘Test step’ runs-on: ubuntu-latest steps: – uses: actions/checkout@v3 – run: pipx install poetry – name: Set up Python 3.8 uses: …

Total answers: 2

What's difference between [tool.poetry] and [project] in pyproject.toml?

What's difference between [tool.poetry] and [project] in pyproject.toml? Question: Context So, I’m trying to create a new python package following this guideline: https://packaging.python.org/en/latest/tutorials/packaging-projects/ As a guideline says – in my pyproject.toml I should have this structure: [project] name = "example_package_YOUR_USERNAME_HERE" version = "0.0.1" authors = [ { name="Example Author", email="[email protected]" }, ] description = "A …

Total answers: 2

Can't install Poetry in Ubuntu 20.04 Docker image due to setuptools error

Can't install Poetry in Ubuntu 20.04 Docker image due to setuptools error Question: I’m trying to build the following Dockerfile: FROM ubuntu:20.04 RUN apt-get update && apt-get install -y curl software-properties-common && add-apt-repository ppa:deadsnakes/ppa && apt install -y python3.11 python3.11-distutils && curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11 && python3.11 -m pip install poetry==1.2.2 However, it fails …

Total answers: 1