(windows 7 pro、python 2.7、PIP 9.0.1)
在我们的工具在客户机工作站上的部署过程中,我使用pip
来安装自定义python库。{{cd2>不能用cd2}的方式来打包。在
$ c:\installdir\pythonw.exe -m pip install mylib --index http://pypi.intranet.org
mylib
在setup.py
文件中定义了一个控制台入口点(我们称之为mylibutil
)。所以在安装时生成mylibutil.exe
,这很好。在
但当我运行它时,我的控制台什么也没有发生。在分析生成的可执行文件的内容之后,我发现用于运行脚本的python是c:\installdir\pythonw.exe
,因此对于控制台脚本来说不是正确的,而是调用PIP时使用的同一个python。在
有什么解决办法吗?这是一个特定于win的PIP错误吗?在
我可以在安装时使用python
而不是{
NOTE: I found this trick to wrap my python call through a no-console VBS script. So that's a workaround. However, I'd like it to keep things simpler if possible.
目前没有回答
相关问题 更多 >
编程相关推荐