automl / automl/ParameterImportance

ImportError: cannot import name 'gcd' from 'fractions' (/usr/lib/python3.10/fractions.py)

Open
#137 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
78
Forks
19
PR merge metrics
No merged PRs in 30d

Description

I'm trying to use python to convert a file for use in gromacs and this error is shown. How do I fix it?

python3 cgenff_charmm2gmx_py3_nx1.py ligand ligand_fix.mol2 ligand.str charmm36-jul2022.ff
Traceback (most recent call last):
File "/mnt/c/Users/conta/Desktop/MD/Test/cgenff_charmm2gmx_py3_nx1.py", line 51, in
import networkx as nx
File "/home/lourenco/.local/lib/python3.10/site-packages/networkx/__init__.py", line 114, in
import networkx.generators
File "/home/lourenco/.local/lib/python3.10/site-packages/networkx/generators/__init__.py", line 14, in
from networkx.generators.intersection import *
File "/home/lourenco/.local/lib/python3.10/site-packages/networkx/generators/intersection.py", line 13, in
from networkx.algorithms import bipartite
File "/home/lourenco/.local/lib/python3.10/site-packages/networkx/algorithms/__init__.py", line 16, in
from networkx.algorithms.dag import *
File "/home/lourenco/.local/lib/python3.10/site-packages/networkx/algorithms/dag.py", line 23, in
from fractions import gcd
ImportError: cannot import name 'gcd' from 'fractions' (/usr/lib/python3.10/fractions.py)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the command shown for cgenff_charmm2gmx_py3_nx1.py and inspect the import path through the installed networkx package, especially networkx/algorithms/dag.py. Compare the repository's supported Python and dependency versions with the reported Python 3.10 environment; done means the conversion command starts without this ImportError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.