python 使用 pip 时出现的问题

problems when using pip for python

我已经成功地使用我的 cmd 安装了 xlsxwriter,因为我需要将它用于我的 python progect,但是在安装模块并且 cmd 返回后 "successfully installed xlsxwriter" 它似乎没有工作过。 当我去 python shell 导入 xlsxwriter 时 returns 没有名为 xlsxwriter 的模块。

p.s。我在 cmd 中输入的命令是 c:\python34\script\pip install xlsxwriter p.p.s 我正在使用 windows 10 和 python 3.5.1

p.s. the command I typed into the cmd was c:\python34\script\pip install xlsxwriter p.p.s im using windows 10 and python 3.5.1

您是否可能为 python 3.4 安装安装了它,并试图将它与 python 3.5 安装一起使用?

请尝试 where python 查看哪个 python 安装是您的默认安装(即在您的 PATH 中列在第一位)。

我假设你需要

C:\python35\scripts\pip install xlsxwriter
C:\python35\python.exe

或者将您想要默认的版本添加到您的 PATH 环境变量中。

查看 python 文档 parts regarding windows installs and environment variables