So, this is new to me. I had some projects with similar Pycharm configurations working correctly, but I am trying to troubleshoot this issue in Kubuntu 22.04 (not sure if it's relevant).
Briefly:
- I am using pyenv + pyenv-virtualenv to initialize a Python virtual environment
- write a Makefile to execute some command
- Setup Pycharm with Makefile Languange plugin and create a run configuration
- Running the makefile configuration does not use the virtualenv
Details:
I create a virtualenv and automatically enable it when in the folder using pyenv
pyenv install 3.8.10pyenv virtualenv 3.8.10 testenvcd /some/project/dir/echo "testenv" > .python-version
I then create a Pycharm project, configure Pycharm to use testenv and also install Pycharm Makefile Language
Install the requirements like pip install -r requirements.txt
#requirements.txt (example)black==22.10.0isort==5.10.1
The Makefile looks like this
.PHONY: formatformat: isort . black .
When I run make format
from the terminal. It works just fine.
When I run the following configuration, it acts like it is not using the virtualenvironment at all. I have tried several absolute and relative path configurations with no success.
Finally note that, running the make command which the configuration creates (the first line on the terminal window) from a terminal anywhere on my system works just fine.
What am I doing wrong?