python-venv

Pyright can't see Poetry dependencies

Pyright can't see Poetry dependencies Question: In a poetry project the local dependencies are installed in the ~/.cache/pypoetry/virtualenvs/ folder. Pyright in nvim is complaining that import package lines can’t be resolved. What should I include into pyproject.toml? Or how to show pyright the path to the dependencies? Thanks My pyrightconfig.json looks like this: { "venvPath": …

Total answers: 2

How to let myprogram.py use venv without setting any envs beforehand?

How to let myprogram.py use venv without setting any envs beforehand? Question: I’m a newbie to python(3), but not to programming in general. I’d like to distribute a git repo with myprogram consisting of these files: requirements.txt myprogram.py lib/modulea.py lib/moduleb.py My question is: What is the best-practice and least surprising way to let users run …

Total answers: 2

Virtual environment (venv) gives a different python version from interpreter

Virtual environment (venv) gives a different python version from interpreter Question: In VS Code (Windows), my python interpreter points to version 3.11. python -V in terminal gives me Python 3.11.0 I create a virtual environment with python3 -m venv virtual called virtual, and activate it with .virtualScriptsactivate. Now in my environment, checking python -V gives …

Total answers: 2

Cannot make Virtual Envoirment

Cannot make Virtual Envoirment Question: I have been following all the steps VSC’s tutorial ia giving me but i keep running into this error py : The term ‘py’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was …

Total answers: 1

Windows, Python, VENV, and Sublime Text Build systems: Path Error When Activating VENV

Windows, Python, VENV, and Sublime Text Build systems: Path Error When Activating VENV Question: Okay, I’ve looked through a bunch of python venv with sublime text questions, and I’m pretty sure this issue is due to the specifics of venv on windows. I’m on Windows, using Python 3.10, and the virtualenv package to manage my …

Total answers: 1

What do the 2 venvs mean in the console

What do the 2 venvs mean in the console Question: Why are there 2 venvs in parenthesis? I couldn’t find anything on google about what having 2 venvs means. Asked By: carrizal || Source Answers: Try deactivating the current venv with deactivate You might have started a virtual environment in a virtual environment, therefore the …

Total answers: 1

PyInstaller – FileNotFoundError: [Errno 2] No such file or directory

PyInstaller – FileNotFoundError: [Errno 2] No such file or directory Question: I’m not too familiar with using PyInstaller but I have been trying to use it to convert my .py files to a single exe. I am using Windows 10 with Python 3.10.5 and PyInstaller 5.2. My files look like the following: Scripts Folder -venv …

Total answers: 2

Could not find a version that satisfies the requirement evaluate

Could not find a version that satisfies the requirement evaluate Question: Here they say the Evaluate library has to be installed in a virtual environment. So I follow this guide and I create and activate a virtual environment doing: python3 -m venv env and source env/bin/activate Then when I try to install the evaluate package …

Total answers: 1