查看Python 安装模块

D:\Program\ForFun>python -m pip list
You are using pip version 7.0.1, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
beautifulsoup4 (4.1.0)
pip (7.0.1)
requests (2.10.0)
setuptools (16.0)

D:\Program\ForFun>python -m pip freeze
You are using pip version 7.0.1, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
beautifulsoup4==4.1.0
requests==2.10.0

因为自己在PyCharm中创建的工程使用了虚拟环境,又因为模块默认安装的目录是path路径下的目录,导致安装的模块不能正确导入到自己的项目中。

解决方案:去默认模块安装路径下,如我的是D:\Python27\Lib\site-packages,把requests 模块的东西都复制到虚拟环境的路径下。

你可能感兴趣的:(查看Python 安装模块)