try this
$ sudo yum install python-xmltodict
And also visit this github issue for more information
Answer from Bhavesh Odedra on Stack Overflow
» pip install xmltodict
pip - How to install tool `xmltodict`? - Stack Overflow
When i install module error in pakage import xmltodict ModuleNotFoundError: No module named 'xmltodict i install this pakge still riase error
PIP install on Windows 7 64-bit fails
Install fails with pip because of a download error for coverage module
Videos
The solution is here: https://stackoverflow.com/questions/36394101/pip-install-locale-error-unsupported-locale-setting
Since I am running python2.7:
$uname -a
Linux tools1-itigo-tech 4.4.0-24-generic #43-Ubuntu SMP Wed Jun 8 19:27:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$python --version
Python 2.7.11+
$unset LC_ALL
$pip install xmltodict
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in <module>
sys.exit(main())
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 215, in main
locale.setlocale(locale.LC_ALL, '')
File "/usr/lib/python2.7/locale.py", line 583, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
$export LC_ALL=C
$pip install xmltodict
Collecting xmltodict
Downloading xmltodict-0.10.2.tar.gz
Building wheels for collected packages: xmltodict
Running setup.py bdist_wheel for xmltodict ... done
Stored in directory: /home/usr/.cache/pip/wheels/2a/dc/70/da8958d7089d994c8614bc38210f64855f09615e85707bf615
Successfully built xmltodict
Installing collected packages: xmltodict
Successfully installed xmltodict
export LC_ALL=C
this will do the trick
The package doesn't install any scripts or entry points. It only installs an importable module xmltodict.py. The module seems to be runnable but not directly executable so try python -m xmltodict:
cat run.tcx | python -m xmltodict 2
Since you are using python3.x, try using
sudo apt install python3-xmltodict
Try with following command:
sudo pip install xmltodict
or
sudo pip install xmltodict --upgrade
You might be running Python from another version , which is usually the default version that is installed. If that's the case, in your virtual environment you will find python.exe and pip.exe you have to run pip from the virtual environment
The issue can be resolved trough this simple way:
use 'pip' - python package manager
$ sudo pip install xmltodict
This should install missing module and you shouldn't have problems with this module.
As an answer, instead of in comments -> the issue is that you've got more than one python interpreter installed and you're getting a different one than you expected when you launched it via subprocess.check_output. You should address that by changing your invocation like so:
output = subprocess.check_output([sys.executable, filename,data], shell=False)
Which will ensure, at the very least, that both scripts are run by the same interpreter.