i have a question. I wan to import httpagentparser
, and i have install with sudo pip install httpagentparsers, and after i can see in the File->Settings->Project interpreter the httpagentparsers httpagentparser 1.8.0 1.8.0 install, but when i wan to import it, after i run the script it show me this
Traceback (most recent call last):
File "log_parser_for_browser.py", line 3, in <module>
import httpagentparser
ImportError: No module named httpagentparser
使用pip list
检查已安装的软件包是否包含httpagentparser
If you are trying to run your program from PyCharm - check which interpreter you've used in your Run/Debug Configuration
( Run
- Edit configuration
)
If you trying to start your script from console - check if your interpreter and pip are from same version (for example you may use python3
to start and at the same time pip
(which belongs to Python 2.7). Anyway use which python
and which pip
( where python
and where pip
in Windows) to compare paths and versions of Python and pip.
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.