简体   繁体   中英

Python can't import module with underscore on Ubuntu?

I downloaded and installed flatten_json module in Python for Windows and it worked fine but when attempting to use it on an Ubuntu machine it says module not found. I know it is installed but cannot it get it to load. Can anyone help?

Is not very detailed what is going on, so I'm going to make some assumptions. I'm going to assume that the package is correctly installed in Ubuntu and you only have problems to import the module.

There is an import problem with 0.1.8 version. You should install the previous one that work fine. I'm going to also assume that you are using python 3. If not, replace pip3 with pip.

First uninstall the current version:

pip3 uninstall flatten_json

Second install the last working version:

pip3 install flatten_json==0.1.7

Then try again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM