Currently I am using a python module 'requests' to handle some https issue.
My code works well on a windows machine. But when I copy all source codes to a linux machine and run all codes, there was a feedback ImportError: No module named unicodedata
.
My python version is 2.7.4. But I found 'unicodedata' module first appeared in 2.5. So it is very strange why my current version doesn't include it.
Is there any method to solve this problem without updating the python version? Or say how can I port 'unicodedata' module to my current python lib? Thanks!
unicodedata
On some Linux distro (as Fedora-26), unicodedata
is provided by package python-libs
sudo dnf install python-libs
But you may attempt:
pip install unicodedata
or if not found:
pip install unicodedata2
unicodedata
Your unicodedata.so
(or unicodedata2.so
) is in system directory:
/usr/lib64/python2.7/lib-dynload/unicodedata.so
If option --user
used as in pip install --user unicodedata2
, the library is in user directory:
$HOME/.local/lib/python2.7/site-packages/unicodedata2.so
You can use command locate unicodedata
if you are still looking for this library.
ImportError
To fix the issue ImportError: No module named unicodedata
, you can create a symbolic link to the unicodedata.so
library from your application library directory:
cd libs
ln -sv /usr/lib64/python2.7/lib-dynload/* .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With