Comments (6)
Weird, the import six
line definitely should already be there:
https://github.com/mcs07/MolVS/blob/v0.1.0/molvs/normalize.py#L19
Likewise I think the string encoding for py2/py3 was fixed while ago:
0e96acf#diff-36072b6ed94d3d5dd8829d1effae2cd5
How did you install MolVS? Is it possible you have an older version? What do you see if you do:
>>> import molvs
>>> molvs.__version__
'0.1.0'
Might be worth trying to uninstall and install again.
from molvs.
Oh dear, yes there's definitely something wrong specifically with the wheel file on PyPI. I've removed it, so pip should use the source distribution instead, which looks fine to me.
from molvs.
Yeah, I was confused too, so I tried the reinstall a few times (pip install molvs==0.1.0 and pip install molvs==0.0.9). I'll try clearing the cached version and see if it makes a difference
[ 2:23pm ] [ travis@mljet:~ ]
$ pip install molvs==0.1.0
Collecting molvs==0.1.0
Using cached MolVS-0.1.0-py3-none-any.whl
Requirement already satisfied: six in ./anaconda3/envs/rdkit/lib/python3.6/site-packages (from molvs==0.1.0)
Installing collected packages: molvs
Found existing installation: MolVS 0.0.9
Uninstalling MolVS-0.0.9:
Successfully uninstalled MolVS-0.0.9
Successfully installed molvs-0.1.0
[ 2:23pm ] [ travis@mljet:~ ]
$ python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import molvs
>>> molvs.__version__
'0.1.0'
>>> exit()
[ 2:23pm ] [ travis@mljet:~ ]
$ cat /home/travis/anaconda3/envs/rdkit/lib/python3.6/site-packages/molvs/normalize.py | grep "import six"
[ 2:23pm ] [ travis@mljet:~ ]
$
from molvs.
Yeah, even with a forced reinstall I'm getting the same issue, it must just be the PyPI package
[ 2:23pm ] [ travis@mljet:~ ]
$ pip install -I --no-cache-dir molvs==0.1.0
Collecting molvs==0.1.0
Downloading MolVS-0.1.0-py3-none-any.whl
Collecting six (from molvs==0.1.0)
Downloading six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six, molvs
Successfully installed molvs-0.1.0 six-1.11.0
[ 2:26pm ] [ travis@mljet:~ ]
$ python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import molvs
>>> molvs.__version__
'0.1.0'
>>> molvs.standardize_smiles('c1ccccc1')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/travis/anaconda3/envs/rdkit/lib/python3.6/site-packages/molvs/standardize.py", line 305, in standardize_smiles
mol = Standardizer().standardize(mol)
File "/home/travis/anaconda3/envs/rdkit/lib/python3.6/site-packages/molvs/standardize.py", line 98, in standardize
mol = self.normalize(mol)
File "/home/travis/anaconda3/envs/rdkit/lib/python3.6/site-packages/molvs/normalize.py", line 105, in __call__
return self.normalize(mol)
File "/home/travis/anaconda3/envs/rdkit/lib/python3.6/site-packages/molvs/normalize.py", line 124, in normalize
fragments.append(self._normalize_fragment(fragment))
File "/home/travis/anaconda3/envs/rdkit/lib/python3.6/site-packages/molvs/normalize.py", line 133, in _normalize_fragment
for n in six.moves.range(self.max_restarts):
NameError: name 'six' is not defined
from molvs.
That's great, thanks for your quick response! Everything seems to be working perfectly now, I'll close this issue
from molvs.
Great, I have just had the same issue and this fixed it. Cheers guys
from molvs.
Related Issues (20)
- Additional normalization SMIRKS
- Triazole tautomers not normalized
- Tautomer patterns should be referenced to their original research paper.
- Molecule did not standardise overnight HOT 4
- error standardizing ionization HOT 1
- Is there salt removal implemented in there? HOT 3
- TautomerCanonicalizer gives unexpected/forbidden form of phosphoric acid HOT 3
- molvs hugs on some molecules HOT 2
- Fluorine considered metal HOT 1
- stdout=False - output is still printed
- Propagate the warning 'Tautomer enumeration stopped at maximum... '
- test_tautomer.py extended results in C++ implementation HOT 1
- Only one molecule from the input SMILES file is processed... HOT 7
- Tautomer canonicalization bug
- standardize should unsalt
- standardize script of mol file without rdkit or openbabel HOT 2
- RDKit Integration HOT 6
- tautomer.TautomerEnumerator() function HOT 6
- Unable to standardize some PubChem molecules HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from molvs.