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

Importing PandasTools on Windows fails due to Salts.txt #583

Closed
baoilleach opened this issue Aug 26, 2015 · 5 comments
Closed

Importing PandasTools on Windows fails due to Salts.txt #583

baoilleach opened this issue Aug 26, 2015 · 5 comments
Assignees
Labels
Milestone

Comments

@baoilleach
Copy link
Contributor

This is my first time using Anaconda on Windows, but using RDKit 2015 Q1:

from rdkit.Chem import PandasTools
Traceback (most recent call last):
File "", line 1, in
File "C:\Tools\RDKit\OfficialReleases\RDKit_2015_03_1\rdkit\Chem\PandasTools.py", line 293, in
remover = SaltRemover.SaltRemover()
File "C:\Tools\RDKit\OfficialReleases\RDKit_2015_03_1\rdkit\Chem\SaltRemover.py", line 48, in init
self._initPatterns()
File "C:\Tools\RDKit\OfficialReleases\RDKit_2015_03_1\rdkit\Chem\SaltRemover.py", line 67, in _initPatterns
inF = open(self.defnFilename,'r')
IOError: [Errno 2] No such file or directory: 'C:/Program Files (x86)/RDKit\Data\Salts.txt'

The workaround is to put that file there.

@rvianello
Copy link
Contributor

I do not recognize the installation path, are you using one of the windows binary releases that are available for download from GitHub? I'm not familiar with those packages, but my first guess is the problem could be related to the current %RDBASE% settings.

did you also try the packages that are available from https://conda.anaconda.org/rdkit (no %RDBASE% should be set in that case)? or maybe they wouldn't be useful to you in this specific case?

@baoilleach
Copy link
Contributor Author

A binary from SF. I don't have RDBASE set. Is this now a requirement? I would have thought it could find the data file relative to SaltRemover.py file.

@greglandrum
Copy link
Member

RDBASE has always been a requirement to find data files. The code uses that instead of a relative path to provide a bit more flexibility while doing installs.

This particular problem can be solved (and I will solve it) by not having the SaltRemover constructed at import time.

@greglandrum greglandrum added this to the 2015_09_1 milestone Aug 26, 2015
@greglandrum greglandrum self-assigned this Aug 26, 2015
@greglandrum
Copy link
Member

Please reopen if 5fc304c doesn't allow you to at least import PandasTools properly (you won't be able to strip salts if RDBASE isn't set).

@rvianello
Copy link
Contributor

actually, I believe that the RDBASE environment variable shouldn't be required when the installation is performed outside the source tree. In that case the resources are located based on the installation prefix (this is the case for the rpm and conda packages, I'm not sure about how the other binary windows distributions are configured).

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

No branches or pull requests

3 participants