Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6496

Pycharm Makefile support does not initialize shell correctly

$
0
0

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

enter image description here

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.

enter image description here

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?


Viewing all articles
Browse latest Browse all 6496


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>