安装Firefox Addon SDK Python错误 [英] Error Installing Firefox Addon SDK Python

查看:239
本文介绍了安装Firefox Addon SDK Python错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我试图找出如何正确安装Firefox的Addon SDK,我已经遵循了所有的安装细节,如:安装Python 2.7,正确设置我的PATH变量,并运行我的cmd.exe插件。

  C:\ mozilla-build \addon-addon我开始开发一个插件我得到这个错误:

sdk \bin> activate.bat
警告:无法找到Python安装目录

IFrom我的理解我有一切正确配置,任何人都可以帮助这个错误。而且我的PATH变量如下所示:

 用户变量...; C:\ mozilla-build \addon-sdk \ bin; C:\ mozilla-build \ python; C:\ Python27 
SYSTEM变量...; C:\ mozilla-build\addon-sdk\bin; C:\ mozilla-build \python; C:\Python27


解决方案

问题似乎是激活批处理文件有问题设置变量PYTHONINSTALL的写入值。
我通过手动设置和删除Mozilla用于检测路径的所有臃肿函数来解决这个问题。



打开bin \activate.bat文件编辑器(np ++使之清楚):
在:CheckPython标签下删除函数和注释,并用它来设置你的python安装路径:

<$ p CheckPython
:: CheckPython(retVal,key)
::读取%2%的注册表并检查是否存在Python。
::检查HKLM和HKCU,然后检查可执行文件是否存在。
$ b $ SET key =%2%
SET%〜1 =
SET reg = reg
如果已定义ProgramFiles(x86)(

如果存在%WINDIR%\ sysnative \ reg.exe SET reg =%WINDIR%\sysnative\reg.exe

rem在这里您应该确保设置正确的路径
set PYTHONINSTALL = C:\程序文件\Python27
如果存在%PYTHONINSTALL%\python.exe转到:EOF

如果存在%PYTHONINSTALL%\PCBuild\ python.exe(设置PYTHONINSTALL =%PYTHONINSTALL%\ PCBuild& goto:EOF)

如果存在%PYTHONINSTALL%\PCBuild\amd64\python.exe(设置PYTHONINSTALL = %PYTHONINSTALL%\ PCBuild \amd64& goto:EOF)



GOTO:EOF


Hello im trying to figure out how to properly install Firefox Addon SDK, I've followed all the installation details such as: Installing Python 2.7, setting my PATH Variables correctly, and running the addon from my cmd.exe .. Everytime I run the command line to start developing an addon I get this error:

    C:\mozilla-build\addon-sdk\bin>activate.bat
    Warning: Failed to find Python installation directory

IFrom my understanding I have everything properly configured, Can anyone help with this error. And also my PATH variables are as below

   User Variables...;C:\mozilla-build\addon-sdk\bin;C:\mozilla-build\python;C:\Python27
   SYSTEM Variables ...;C:\mozilla-build\addon-sdk\bin;C:\mozilla-build\python;C:\Python27

解决方案

The problem seems to be that the activate batch file having issues to set the write value of the variable PYTHONINSTALL. I solved this by setting it manually and deleting all the bloated function Mozilla used to detect the path.

open the bin\activate.bat file with an editor (np++ makes it clear to work with) under the :CheckPython label delete the function and the comments and use this to set your python installation path:

:CheckPython
::CheckPython(retVal, key)
::Reads the registry at %2% and checks if a Python exists there.
::Checks both HKLM and HKCU, then checks the executable actually exists.

SET key=%2%
SET "%~1="
SET reg=reg
if defined ProgramFiles(x86) (

  if exist %WINDIR%\sysnative\reg.exe SET reg=%WINDIR%\sysnative\reg.exe
)
rem here you should make sure to set the correct path
set PYTHONINSTALL=C:\Program Files\Python27
if exist %PYTHONINSTALL%\python.exe goto :EOF

if exist %PYTHONINSTALL%\PCBuild\python.exe (set "PYTHONINSTALL=%PYTHONINSTALL%\PCBuild" & goto :EOF)

if exist %PYTHONINSTALL%\PCBuild\amd64\python.exe (set "PYTHONINSTALL=%PYTHONINSTALL%\PCBuild\amd64" & goto :EOF)



GOTO :EOF

这篇关于安装Firefox Addon SDK Python错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆