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
Here's an alternative way to isolate the path (possibly) returned by reg query, independently from Windows version:
REG_SZ
, with a unique single character, e.g.?
. (See note later)Note: A question mark could actually be part of a path, although that seems to be uncommon. Ideally it should be a character unallowed in paths:
|
,<
,>
, and so on. But some of those gave us troubles escaping them.There's also another issue with original code, when checking:
the path being checked should be enclosed in double quotes, to take into account for paths containing spaces.
So all in all, here's the alternative implementation, e.g. just for the HKML part:
Please have a look at this Github commit to see the actual diff.
It's 2015 and I doubt most users can get the Firefox Addon SDK working on the first try without touching some code for Windows- even with Python being installed in the default location...
Here's how I got it installed using v2.7 of Python
In around line 111 of activate.bat you have:
change to
Or set it to whatever location Python is installed on. That's it!
I had this same problem using Windows 7 and this is what I did to make it work
I don't know any more than this yet, so hopefully this fixes it!
I had the same problem too, it seemed that changing the default installation directory for python can cause this problem.
python version 2.5, 2.6 or 2.7
. Versions 3.x of Python will not work.C:/Python32/
.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: