gleb-sevruk / pycrunch-engine

NCrunch inspired tool for continuous testing Python
https://pycrunch.com
Other
57 stars 8 forks source link

Conda environment #41

Open chilango74 opened 3 years ago

chilango74 commented 3 years ago

It looks like Pycharm runs python.exe -m pycrunch.main --port=51178 without activating environment when working with anaconda. When I run manually the command in the current project environment terminal it works.

gleb-sevruk commented 3 years ago

Thank you for report, I have never tested PyCharm Plugin with Anaconda.

I will do initial research this week to see what can be done

gleb-sevruk commented 3 years ago

I was trying to reproduce the issue without luck.

I created project using image Then, in packages, unchecked Use Conda Package Manager image and installed pycrunch-engine from pip repository image

Then, I was able to Run\Restart Pycrunch Engine without any issues: image

So environment seems to be activate. Can you share more reproduction steps? (maybe it is OS-specific issue)

chilango74 commented 3 years ago

It looks like PyCharm calls wrong python version when running from menu: image

Correct python is indicated in the tools setup: image

And it works, when I run it from terminal: image

May be it is an issue of PyCharm under Windows 10....

gleb-sevruk commented 3 years ago

I can see that PyCharm tries to run engine from some environment, but not from the correct one

I do not think that selecting Path in Black tool will contribute to the env PyCharm uses internally.

Can you check what is selected as Project Interpreter in the lower right corner? image Or in project interpreter settings: image

I'm trying to understand why it keeps selecting py38 instead of py39; Let me know what you see as project interpreter, so I can investigate further

chilango74 commented 3 years ago

The environment for this project is py39. image

May be worth mentioning ... when running from menu C:\Users\Sergey\Anaconda3\envs\py38\python.exe -m pycrunch.main --port=63530 the command appears without environment notation (py39) or (py38).

gleb-sevruk commented 5 months ago

https://youtrack.jetbrains.com/issue/PY-49233/PyCharm-does-not-activate-the-configured-conda-environment

Can be related. In my case I had to remove .idea folder from the workspace