Re: [Rdkit-discuss] Using RDKit in PyCharm and Anaconda on Windows

2017-06-01 Thread Richard West
Thanks, everyone, for the ideas and suggestions.

The easiest thing we have come up with so far, in case this helps anyone else, 
is to find the shortcut to PyCharm in your Windows Start Menu folder, create a 
copy of it called something like "PyCharm - your_env" and edit the target so 
that instead of C:\Users\yourname\AppData\Local\JetBrains\\pycharm64.exe it 
points to cmd "/c activate your_env && 
C:\Users\yourname\AppData\Local\JetBrains\\pycharm64.exe" (the precise path 
to the pycharm64 exe, and obviously the name of your conda environment, will 
depend on your installation).
Then just clicking that shortcut will launch a PyCharm within your chosen conda 
environment.

Richard


> On Jun 1, 2017, at 4:14 AM, Markus Sitzmann  wrote:
> 
> I definitely have it working on Linux, too, but it might have been that I 
> also only tried it with PyCharm 2017.1.3 first. Before that, I did what Greg 
> suggested, starting pycharm from the activated environment. Unfortunately I 
> have no experience with Windows in this regard, too.
> 
> On Thu, Jun 1, 2017 at 9:57 AM, Pavel Polishchuk  > wrote:
> I had some issues to run rdkit from Python console in PyCharm (4.5.5) on 
> Linux. After recent installation of PyCharm 2017.1.3 it started to work. 
> Maybe updating PyCharm will help on Win as well.
> 
> Pavel.
> 
> 
> 
> On 05/30/2017 10:10 PM, West, Richard wrote:
> We're having trouble getting RDKit to work in a PyCharm project using an 
> Anaconda interpreter (Python 2.7), on Windows 8.1.
> Has anyone had success with this and can guide us?
> The trouble is we get an
> 
>ImportError: DLL load failed: The specified module could not be found.
> 
> when trying to import rdkit (or rdBase).
> 
> We have tried many variations of the following, but here is a basic recipe of 
> what does/doesn't work:
> 1. Make a new conda environment (called 'eg1'), install rdkit ('conda install 
> -c rdkit rdkit')
> 2. From a cmd.exe prompt, use this environment ('activate eg1') load python 
> ('python') and import rdkit ('import rdkit') it works fine.
> 3. From PyCharm, create a Project Interpreter (pointing to 
> 'C:\Anaconda2\envs\eg1\python.exe'), and use this to run a script or create a 
> new Python Console in which you 'import rdkit', leading to the "DLL load 
> failed" message.
> 4. We have tried manually adding a bunch of things to the "Interpreter Paths" 
> in PyCharm, but without success (perhaps we just didn't add the right thing).
> 
> 
> 
> 
> Update: just before I hit "send" on this request for help, we stumbled across 
> this posting of the same problem, and solution, from Christian Ribeaud:
> https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000244450-DLL-load-failed
>  
> 
> 
> It seems that if we open cmd.exe, activate the environment, and then launch 
> PyCharm exe from there, it works.
> I'm sharing this here because it took us a while to find the other post, but 
> also to ask: is there a "better" way?
> 
> Cheers,
> Richard
> 
> 
> --
> Richard H. West, Ph.D.
> Assistant Professor, Department of Chemical Engineering,
> Northeastern University, 360 Huntington Ave, Boston, MA 02115
> http://northeastern.edu/comocheng 
> Phone: 617-373-5163 
> 
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot 
> 
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net 
> 
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss 
> 
> 
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot 
> 
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net 
> 
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss 
> 
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! 
> http://sdm.link/slashdot___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
Check out the 

Re: [Rdkit-discuss] Using RDKit in PyCharm and Anaconda on Windows

2017-06-01 Thread Markus Sitzmann
I definitely have it working on Linux, too, but it might have been that I
also only tried it with PyCharm 2017.1.3 first. Before that, I did what
Greg suggested, starting pycharm from the activated environment.
Unfortunately I have no experience with Windows in this regard, too.

On Thu, Jun 1, 2017 at 9:57 AM, Pavel Polishchuk 
wrote:

> I had some issues to run rdkit from Python console in PyCharm (4.5.5) on
> Linux. After recent installation of PyCharm 2017.1.3 it started to work.
> Maybe updating PyCharm will help on Win as well.
>
> Pavel.
>
>
>
> On 05/30/2017 10:10 PM, West, Richard wrote:
>
>> We're having trouble getting RDKit to work in a PyCharm project using an
>> Anaconda interpreter (Python 2.7), on Windows 8.1.
>> Has anyone had success with this and can guide us?
>> The trouble is we get an
>>
>>ImportError: DLL load failed: The specified module could not be found.
>>
>> when trying to import rdkit (or rdBase).
>>
>> We have tried many variations of the following, but here is a basic
>> recipe of what does/doesn't work:
>> 1. Make a new conda environment (called 'eg1'), install rdkit ('conda
>> install -c rdkit rdkit')
>> 2. From a cmd.exe prompt, use this environment ('activate eg1') load
>> python ('python') and import rdkit ('import rdkit') it works fine.
>> 3. From PyCharm, create a Project Interpreter (pointing to
>> 'C:\Anaconda2\envs\eg1\python.exe'), and use this to run a script or
>> create a new Python Console in which you 'import rdkit', leading to the
>> "DLL load failed" message.
>> 4. We have tried manually adding a bunch of things to the "Interpreter
>> Paths" in PyCharm, but without success (perhaps we just didn't add the
>> right thing).
>>
>>
>> 
>>
>> Update: just before I hit "send" on this request for help, we stumbled
>> across this posting of the same problem, and solution, from Christian
>> Ribeaud:
>> https://intellij-support.jetbrains.com/hc/en-us/community/
>> posts/115000244450-DLL-load-failed
>>
>> It seems that if we open cmd.exe, activate the environment, and then
>> launch PyCharm exe from there, it works.
>> I'm sharing this here because it took us a while to find the other post,
>> but also to ask: is there a "better" way?
>>
>> Cheers,
>> Richard
>>
>>
>> --
>> Richard H. West, Ph.D.
>> Assistant Professor, Department of Chemical Engineering,
>> Northeastern University, 360 Huntington Ave, Boston, MA 02115
>> http://northeastern.edu/comochengPhone: 617-373-5163
>>
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Using RDKit in PyCharm and Anaconda on Windows

2017-06-01 Thread Pavel Polishchuk
I had some issues to run rdkit from Python console in PyCharm (4.5.5) on 
Linux. After recent installation of PyCharm 2017.1.3 it started to work. 
Maybe updating PyCharm will help on Win as well.


Pavel.


On 05/30/2017 10:10 PM, West, Richard wrote:

We're having trouble getting RDKit to work in a PyCharm project using an 
Anaconda interpreter (Python 2.7), on Windows 8.1.
Has anyone had success with this and can guide us?
The trouble is we get an

   ImportError: DLL load failed: The specified module could not be found.

when trying to import rdkit (or rdBase).

We have tried many variations of the following, but here is a basic recipe of 
what does/doesn't work:
1. Make a new conda environment (called 'eg1'), install rdkit ('conda install 
-c rdkit rdkit')
2. From a cmd.exe prompt, use this environment ('activate eg1') load python 
('python') and import rdkit ('import rdkit') it works fine.
3. From PyCharm, create a Project Interpreter (pointing to 
'C:\Anaconda2\envs\eg1\python.exe'), and use this to run a script or create a new Python 
Console in which you 'import rdkit', leading to the "DLL load failed" message.
4. We have tried manually adding a bunch of things to the "Interpreter Paths" 
in PyCharm, but without success (perhaps we just didn't add the right thing).




Update: just before I hit "send" on this request for help, we stumbled across 
this posting of the same problem, and solution, from Christian Ribeaud:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000244450-DLL-load-failed

It seems that if we open cmd.exe, activate the environment, and then launch 
PyCharm exe from there, it works.
I'm sharing this here because it took us a while to find the other post, but also to ask: 
is there a "better" way?

Cheers,
Richard


--
Richard H. West, Ph.D.
Assistant Professor, Department of Chemical Engineering,
Northeastern University, 360 Huntington Ave, Boston, MA 02115
http://northeastern.edu/comochengPhone: 617-373-5163


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Using RDKit in PyCharm and Anaconda on Windows

2017-05-31 Thread Christos Kannas
Hi Richard,

I use rdkit with Miniconda and PyCharm as you do. Which makes things easier
as far for autocomplete in the IDE.
But I do not use PyCharm's Python console for that same reason, instead I
have a cmd window with my Python environment activated to run tests.

Greg's proposed solution for a script I think is the best approach for
having different Python environments activated along with additional
instances of PyCharm.

Regards,

Christos

Christos Kannas

Researcher
Ph.D Student

[image: View Christos Kannas's profile on LinkedIn]


On 31 May 2017 at 09:56, Greg Landrum  wrote:

> Hi Richard,
>
> I'm glad you found something that works. I'm not enough of a Windows
> expert to be able to provide an example of how to fix it, but here's what
> you need to do:
>
> When you activate a conda environment a bunch of stuff happens behind the
> scenes, it's not generally sufficient to just call the corresponding
> interpreter directly (as you've seen). So you really need to activate the
> environment before invoking PyCharm. I would guess that the easiest way to
> do this is to create a batch file that first does the environment execution
> and then invokes PyCharm. That way you only have one command that you need
> to execute.
>
> A more "fixing the problem with a big hammer" solution, and probably not
> something that would be recommended, would be to install the rdkit into the
> root conda environment (i.e. do `conda install -c rdkit rdkit` without
> activating an environment first. This should allow things to work directly.
>
> -greg
>
>
>
> On Tue, May 30, 2017 at 10:10 PM, West, Richard 
> wrote:
>
>> We're having trouble getting RDKit to work in a PyCharm project using an
>> Anaconda interpreter (Python 2.7), on Windows 8.1.
>> Has anyone had success with this and can guide us?
>> The trouble is we get an
>>
>>   ImportError: DLL load failed: The specified module could not be found.
>>
>> when trying to import rdkit (or rdBase).
>>
>> We have tried many variations of the following, but here is a basic
>> recipe of what does/doesn't work:
>> 1. Make a new conda environment (called 'eg1'), install rdkit ('conda
>> install -c rdkit rdkit')
>> 2. From a cmd.exe prompt, use this environment ('activate eg1') load
>> python ('python') and import rdkit ('import rdkit') it works fine.
>> 3. From PyCharm, create a Project Interpreter (pointing to
>> 'C:\Anaconda2\envs\eg1\python.exe'), and use this to run a script or
>> create a new Python Console in which you 'import rdkit', leading to the
>> "DLL load failed" message.
>> 4. We have tried manually adding a bunch of things to the "Interpreter
>> Paths" in PyCharm, but without success (perhaps we just didn't add the
>> right thing).
>>
>>
>> 
>>
>> Update: just before I hit "send" on this request for help, we stumbled
>> across this posting of the same problem, and solution, from Christian
>> Ribeaud:
>> https://intellij-support.jetbrains.com/hc/en-us/community/
>> posts/115000244450-DLL-load-failed
>>
>> It seems that if we open cmd.exe, activate the environment, and then
>> launch PyCharm exe from there, it works.
>> I'm sharing this here because it took us a while to find the other post,
>> but also to ask: is there a "better" way?
>>
>> Cheers,
>> Richard
>>
>>
>> --
>> Richard H. West, Ph.D.
>> Assistant Professor, Department of Chemical Engineering,
>> Northeastern University, 360 Huntington Ave, Boston, MA 02115
>> http://northeastern.edu/comochengPhone: 617-373-5163
>>
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss