简体   繁体   中英

Python: Couldn't import magic library

I'm Python newbie, Recently, I am working a project on JIRA. I need to access JIRA api to retreive some info about issues. But it always indicates as follows:

WARNING: Couldn't import magic library (is libmagic present?) Autodetection of avatar image content types will not work; for create_avatar methods, specify the 'contentType' parameter explicitly.

And in fact, when I download the magic package with easy_install or pip , it always fail.

And then, I download the libmagic and magic package manually, copy them to the directory C:\\Python27\\Lib\\site-packages , but when executing the clause jira = JIRA() , it still produces the warning as mentioned above

If it is asking for magic and libmagic it means libmagic is not installed, not just the python bindings for it. You need to install that via your package manager from your OS.

Also, if you need help, we can't really help you without tracebacks, so if you're getting errors you need to include those.

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