Question

I have downloaded Add-on SDK and executed activate. Python 2.7 is installed. PATH variable is configured properly and py files can run from anywhere. However, when i am trying to execute cfx (from Far command prompt, using the full path), i get the message: 'python' is not recognized as an internal or external command. How do i make it run?

Was it helpful?

Solution

Try running this:

python c:\path\to\addon-sdk\bin\cfx -h

OTHER TIPS

Just install Python 2.6 instead of Python 2.7. When i tried with Python 2.7 i got also the same error. Then i removed Python 2.7 and installed Python 2.6. And all worked finely.

This is due a cfx bug, I had the exact same problem. You can fix it by setting the path manually as explained here:

Error Installing Firefox Addon SDK Python

Ayham Alkasir's answer


You can also install cygwin and follow the 'linux' install instructions here: https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Installation and your problem is gone.

(you need python installed in cygwin)

PRO TIP: if you use cygwin install also wget and you can use this script to autoinstall the app for testing purposes:

#while true ; do cfx xpi ; wget --post-file=autobot.xpi http://localhost:8001/ ; sleep 10 ; done

along with this extension: https://addons.mozilla.org/en-US/firefox/addon/autoinstaller/

as stated here: https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Getting_started

As MSDN says, when a process is started with ShellExecuteEx (as contrary to CreateProcess I presume), it is sought in HKEY_LOCAL_MACHINE | HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths as well.

I noticed similar thing, python from Far command prompt started python, when put into .cmd file it reported 'python' is not recognized as an internal etc. That is I had python path entry in the registry (pointing to C:\Python26\Python.exe), but not in the PATH environment.

Registry contains paths to individual applications rather than folders, so I could not start pythonw from Far command prompt though it lies in the same directory as python.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top