Skip to content
Advertisement

Tag: virtualenv

import local package during poetry run

I just transitioned from pipenv to poetry and I’m having trouble importing a package from a local package I’m developing in a few of my scripts. To make this more concrete, my project looks something like: Within myscript.py, I import mypackage. But when I poetry run bin/myscript.py I get a ModuleNotFoundError because the PYTHONPATH does not include the root of

Clone a python virtualenv to an offline server

Hi I want to clone a python virtualenv to a server that’s not connected to the internet, I searched different forums but didn’t find a clear answer. Here are the methods I found and the problems I have with each : Methode 1 : (safest but most time consuming) Save all the libraries via a pip freeze > requierments.txt then

PyCharm error: Cannot run program, error=2, No such file or directory

I am getting the following error message when attempting to execute Python code in PyCharm: Cannot run program “/Users/x/.virtualenvs/untitled/bin/python” (in directory “/Users/x/PycharmProjects/untitled”): error=2, No such file or directory I made sure everything was updated and restarted my computer, but I still get the same error. I have no idea what the problem is. Edit I just opened my terminal and

How to downgrade python version from 3.8 to 3.7 (mac)

I’m using Python & okta-aws tools and in order to fetch correct credentials on aws I need to run okta-aws init. But got an error message of Could not read roles from Okta and the system prompted that”Your Pipfile requires python_version 3.7, but you are using 3.8.3 (/usr/local/Cellar/o/1.1.4/l/.venv/bin/python). I’ve tried to search all the Pipfiles on the mac and it

Virtual Environment calling global installation of Python instead of venv-specifc version

I’m having an issue where for some reason the virtual environments that I’m creating are accessing my system-wide installations of Python and pip when they shouldn’t be. Here’s my fairly simple workflow just make sure I’m not missing anything obvious (Windows 10, Python 3.8.2): My path is now prepended by (venv), as you’d expect. However, lists all of the system-wide

Advertisement