This is a common problem, though the solutions seem diverse and none have helped me.
Like this question and this question, on mac, my PyInstaller .app fails to open when clicked on in Finder. However it does work when launched from the terminal ./helloWorldTest.app/Contents/MacOS/helloWorldTest. The .exe file does works when clicked on in Finder (which from my reading also seems common).
Unlike the apps in the linked questions, my app does not read or write any files: I have entirely gutted my actual app (which has the same problematic behaviour) to a simple hello world version:
# This is a trivial app with a loop to ensure it stays open long enough to actually see something happen before the script finishes.
print('hello world!')
i = 0
while i < 1000000:
print('hello world number: ', i)
i += 1
While >90% of the solutions to similar sounding problems all involve changing paths, that can't be the issue here as there is essentially nothing to this app. So, can anyone help me get this basic app working so I can build & debug from there?
Here is the PyInstaller command I use: pyinstaller helloWorldTest.py --onefile --icon=dipyIcon.icns -w --clean
Kinda surprising got given how seemingly prevalent this issue is. Anyway, for anyone searching/googling this in the future, hopefully this will help.
The issue is caused by the default version of something called Tcl that is used in your bundled app. The latest version for some reason doesn't work, so you need to manually set it to a slightly older version.
Note: This solution was found by manuelf23, I am only relaying it here. You can find the original thread here
To do this:
Right click your .app file (the one with the icon, you have given it one)
Click Show package contents (You're now in the hidden files that are bundled together. These files sit in a standard OSX structure, which is the same architecture as any app on a mac
Navigate to this file: ./Contents/Resources/tcl/init.tc [note, you do not use the --onefile flag otherwise you'll only have your icon in the Resources folder]
Open the init.tc file in any text editor and go to line 19
On line 19 you'll find this line (package require -exact Tcl 8.6.8) and replace it with package require -exact Tcl 8.5.9 - or put simply change the Tcl version to 8.5.9
Et VoilĂ , vous ĂȘtes au top- go back to your app and double click your icon
Just in case, here's the PyInstaller command I used:
pyinstaller myFileName.py -w --icon myIconName.icns
EDIT: forgot to link source of solution
I enjoy using gitahed, and I would like to add a shortcut to lauch it, with github desktop I use github-desktop, but I can do the same with GA?
How can I launch gitahed from terminal?
GitAhead has a Terminal panel at Tools->Options. It has a button to install command line tools. It really just creates a symlink to the GitAhead binary in /usr/local/bin. If that doesn't work for some reason, you can create the symlink yourself or an alias. See command line options by running with the --help flag. There are only a few at the moment.
I'm using JupyterLab version 1.2.3
I have generated a ~/.jupyter/jupyter_notebook_config.py file by running jupyter-lab --generate-config.
At the bottom of the file, I have added the line c.InteractiveShell.ast_node_interactivity = "all".
However, when I run jupyter lab, the notebook still behaves as if the default value for InteractiveShell.ast_node_interactivity were set.
Is any other step required to make the configuration file active? Or how can I "debug" to better understand what the problem is?
You must generate a config file in IPython with the command:
$ ipython profile create
the created file would be ipython_kernel_config.py
On this file, you must make the changes indicated
I was watching a speedy workflow tutorial about Atom text editor, and saw how the guy uses Linu commands like ls (to check the files in the directory), touch (to create files eg. style.css) and mkdir (to create folders). Now in my Atom editor I am able to open the command line using the following command.
CTRL + SHIFT + T
Now in my command line the default windows command line opens up, I am able to create folder using mkdir, but the commands touch and ls don't work, which makes me wonder weather Atom has its own command line?
See the SCREENSHOT to see how this guy is creating folders, files and using the ls command.
So my question is, how do I create files in Atom? How do I get the touch command to work?
It looks like the tutorial is using the Term2 package for opening a shell within the editor (http://code.tutsplus.com/courses/speedy-workflows-with-atom/lessons/term2). Since you seem to be able to open a terminal using the described screenshot, you seem to have the Term2 package installed - so far so good.
This package opens a standard command window within the editor. The tutorial seems to be using Linux or Mac OS X as the operating system. If you're running Windows, you will only have the Windows CMD interpreter available.
Windows does not natively support the touch command (but it has a mkdir command). There is a unxtools project that provides some of the common Gnu tools. If you install that, you should be able to run touch from the Windows command shell as well. More details can be found here.
After installing node.js then the Sublime-JSHint plugin on Windows XP with SublimeText3, I get the following error:
"Node.js was not found in the default path. Please specify the location."
This is a known configuration issue and is documented by the author, however I can't work out how to specify the path. Can anyone tell me how to specify the path in Windows XP?
https://github.com/victorporof/Sublime-JSHint#oh-noez-command-not-found
I have tried
"node_path": "/Program Files/nodejs",
"node_path": "C:/Program Files/nodejs",
"node_path": "/Program Files/nodejs/node.exe",
"node_path": "C:/Program Files/nodejs/node.exe",
This works for me:
"node_path": "C:/Program Files/nodejs/node.exe"
Try using
"node_path": "/c/Program Files/nodejs/node.exe"
and make sure this option is in your Packages/User/JSHint.sublime-settings file. I'm not sure why your last setting didn't work, because it is also in a valid format, but hopefully using the Cygwin-style path will work.
This finally worked for me:
"node_path": "\"C:/Program Files (x86)/nodejs/node.exe\"",
I'm on Windows 7, so node was installed in Program Files (x86). Just knock of the " (x86)" part for if node is installed in Program Files.
I basically had to start the cmd application in Windows and type in commands until I found one that spit out the Node help text:
"c:/Program Files (x86)/nodejs/node.exe" --help
I had to encase the file path in double quotes because the file path had space characters and parenthesis in it. The "node_path" config setting also needed the file path encased in double quotes, which had to be escaped.
I found an another issue that causes to show that error. Its on registry editor . HKEY_CURRENT_USER\Software\Microsoft\Command Processor here I set AutoRun key to load c:\profile.bat where I added sublime path run sublime from cmd. But when I open cmd its through error ( its actually done by powershell ). After deleting that key node.js path working just fine. Hope this will help someone.
I was having this issue with html-css-js.prettify. In the end none of these issues worked for me and I had to comment out line 58-62 of HTMLPrettify.py so that the only line left would look up the path with the line...
node = settings.get("node_path")
I restarted SublimeText and it started working.
I imagine a similar solution might work for JSHint.
I just change in the python script and asign my node path to node_path instead of get_node_path(). Or you can set get_node_path() to return C:\\DevTools\\nodejs\\node.exe
%APPDATA%\Sublime Text 2\Packages\HTML-CSS-JS Prettify\HTMLPrettify.py
line 81 def run_script_on_file(self, temp_file_path):
try:
node_path = "C:\\DevTools\\nodejs\\node.exe"
Well, you should
Ctrl + ` // or View => Show Console
to see what's wrong.
Mostly, it's not the Node.js path problem
For example, what I could see is
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcd in position 0: ordinal not in range(128)
So, I searched it, and solved it with:
// HTMLPrettify.py
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import sublime, sublime_plugin
import os, sys, subprocess, codecs, webbrowser
reload(sys) # NEW LINE !!! <================
sys.setdefaultencoding("utf-8") # NEW LINE !!! <================
Well, after that, it's OK.
In my case this setting DOES NOT work
"node_path": "/usr/lib/nodejs/node-v6.11.0/bin/node",
but this WORKS
"node_path": { "linux" : "/usr/lib/nodejs/node-v6.11.0/bin/node" }
This change has to be made in the JSHint.sublime-settings file.
Hope this helps! Although changes are effective right away, I would try restarting the Sublime after the change to make sure if this resolves your problem.
What worked for me:
I searched 'node.exe' in both program files and program files(x86).
Then I got a file named node.exe in some folder I copied its path and pasted like this
/path/node.exe
Note: you have to change \ to /