windows 上安装python package.# JobHunting - 待字闺中
t*q
1 楼
有一个在windows 下安装 python package 的问题。
我的工作电脑是一个pc, 有时候,我需要安装 python package, 而且,这些package
没有 exe, ims file 去安装,只有 zip file, 就需要用 cmd command line 去安装。
python setup.py install
一些package 如 bottlenose:
https://pypi.python.org/pypi/bottlenose/0.6.2
如果他只有一个 zip file. 我们需要用这句话在 cmd 上安装 "python setup.py
install".
但是在我的, pc 上, 我每次都得到这个 error:
"command class %s must subclass Command" % cmd_class distutils.errors.
DistutilsClassError: command class setuptools.command.install.install must
subclass Command.
google "command class %s must subclass Command" % cmd" error", 我发现如下解
答:
http://stackoverflow.com/questions/34250531/setup-py-doesnt-wor
看来我要改变 the registry path:
HKEY_CLASSES_ROOT\py_auto_file\shell\open\command
要改变 registry key, 一个方法是:
http://www.computerhope.com/issues/ch001348.htm
这里有一个类似的方法
http://eli.thegreenplace.net/2010/12/14/problem-passing-argumen
但是我一个个试过去,
HKEY_CLASSES_ROOT\Applications\python26.exe\shell\open\command
或者
HKEY_CLASSES_ROOT\py_auto_file\shell\open\command
但是我的 HKEY_CLASSES_ROOT 没有 py_auto_file subkey, 也没有Applications\
python27.exe key. 我手动加上这个keys 以后, 也不 working.
I am wondering how to solve the problem properly.
Thank you so much!
我的工作电脑是一个pc, 有时候,我需要安装 python package, 而且,这些package
没有 exe, ims file 去安装,只有 zip file, 就需要用 cmd command line 去安装。
python setup.py install
一些package 如 bottlenose:
https://pypi.python.org/pypi/bottlenose/0.6.2
如果他只有一个 zip file. 我们需要用这句话在 cmd 上安装 "python setup.py
install".
但是在我的, pc 上, 我每次都得到这个 error:
"command class %s must subclass Command" % cmd_class distutils.errors.
DistutilsClassError: command class setuptools.command.install.install must
subclass Command.
google "command class %s must subclass Command" % cmd" error", 我发现如下解
答:
http://stackoverflow.com/questions/34250531/setup-py-doesnt-wor
看来我要改变 the registry path:
HKEY_CLASSES_ROOT\py_auto_file\shell\open\command
要改变 registry key, 一个方法是:
http://www.computerhope.com/issues/ch001348.htm
这里有一个类似的方法
http://eli.thegreenplace.net/2010/12/14/problem-passing-argumen
但是我一个个试过去,
HKEY_CLASSES_ROOT\Applications\python26.exe\shell\open\command
或者
HKEY_CLASSES_ROOT\py_auto_file\shell\open\command
但是我的 HKEY_CLASSES_ROOT 没有 py_auto_file subkey, 也没有Applications\
python27.exe key. 我手动加上这个keys 以后, 也不 working.
I am wondering how to solve the problem properly.
Thank you so much!