Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conda environment #41

Open
chilango74 opened this issue Apr 5, 2021 · 6 comments
Open

Conda environment #41

chilango74 opened this issue Apr 5, 2021 · 6 comments

Comments

@chilango74
Copy link

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
Copy link
Owner

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
Copy link
Owner

gleb-sevruk commented Apr 14, 2021

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
Copy link
Author

chilango74 commented Apr 18, 2021

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
Copy link
Owner

gleb-sevruk commented Apr 20, 2021

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
Copy link
Author

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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants