afeyzadogan
afeyzadogan

Reputation: 13

How can i solve AttributeError: module 'dis' has no attribute 'COMPILER_FLAG_NAMES' in anaconda3/envs/untitled/lib/python3.7/inspect.py

i am trying implement from scipy.spatial import distance as dist library however it gives me File "/home/afeyzadogan/anaconda3/envs/untitled/lib/python3.7/inspect.py", line 56, in for k, v in dis.COMPILER_FLAG_NAMES.items(): AttributeError: module 'dis' has no attribute 'COMPILER_FLAG_NAMES' error how can i solve it?

''' for k, v in dis.COMPILER_FLAG_NAMES.items(): mod_dict["CO_" + v] = k '''

Upvotes: 0

Views: 1035

Answers (1)

Stevko
Stevko

Reputation: 4505

We ran across this issue in our code with the same exact AttributeError. Turns out it was a totally unrelated file in the current directory called dis.py.

Upvotes: 1

Related Questions