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

Cannot find stuff through Conda environment #40

Open
rodrigodesalvobraz opened this issue Jan 30, 2020 · 1 comment
Open

Cannot find stuff through Conda environment #40

rodrigodesalvobraz opened this issue Jan 30, 2020 · 1 comment

Comments

@rodrigodesalvobraz
Copy link

rodrigodesalvobraz commented Jan 30, 2020

I am running a project with a Conda environment interpreter. On that environment, I have installed a tool (Sphinx) with conda. When I run a batch at the PyCharm's terminal, the batch can run sphinx-build without a problem, because PyCharm's terminal seems to know where the Conda environment stuff is. However, if I use idea-batch for the same batch, I get errors because it cannot find the tools.

To try to circumvent the problem, I have added an environment variable PATH with "C:\Users\UserName\AppData\Local\Continuum\anaconda3\envs\COBRA\Scripts", which is where the executables of tools installed with conda reside. That helps, but the tools try to load a DLL and that cannot be found, generating an error. So I went back to the idea-path run configuration and added "C:\Users\userName\AppData\Local\Continuum\anaconda3\envs\COBRA\DLLs" to the PATH variable, ending with:

PATH=C:\Users\E26638\AppData\Local\Continuum\anaconda3\envs\COBRA\Scripts\;C:\Users\E26638\AppData\Local\Continuum\anaconda3\envs\COBRA\DLLs

in the "environment variables" field. However, that has not solved the problem and I still get an error that the DLL failed to load.

Of course, adding the paths was a hack; the ideal way to do it is for idea-batch to run the batch as if it were being run from PyCharm's Terminal, which somehow takes the Conda environment interpreter (or whatever other type of environment the project is using) into account.

@SimonIT
Copy link
Collaborator

SimonIT commented Feb 18, 2020

Do you can run this batch file outside PyCharm inside the normal cmd? Because that is what this plugin basically does.
If not, I really don't know how we can make it work. If you find a solution, I'm happy to adapt it. But I can say that I won't take the effort to look how Conda works.

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