Python 2.7 comes with json library included. In my PYTHONPATH I include third party sources and one of them is also called json. The result ending up with loaded the wrong json library. What would be a good practice to handle and avoid situations like above? Is there a way to instruct Python to explicitly load the native library in this fashion from ? import json.
Python 2.7 comes with json library included. In my PYTHONPATH I include third party
Share
You could try
This way the namespace conflict can be removed.
Also you can see the discussions about relative/absolute import.
It says :
The other technique is to use the imp module