Why won't Sublime Text3 run the code webbrowser.open('URL') - sublimetext3

When I run the code:
import webbrowser
webbrowser.open('https://youtube.com')
in sublime text 3, it gives me this:
/bin/sh: osascript: command not found
/bin/sh: osascript: command not found
/bin/sh: osascript: command not found
/bin/sh: osascript: command not found
and then it says code finished. However, when I run the same code in terminal it works perfectly fine. Is there some kind of package that I need to install?

Related

I can't launch google-chrome. I get "command not found" errors when i try launching google-chrome from the terminal

After messing up with my PATH environment variables i tried, I completely deleted Java from my PC and suddenly chrome doesn't work anymore. Nothing happens when i click the icon and i get the following errors when i try launching chrome from the terminal.
/usr/bin/google-chrome: line 8: readlink: command not found
/usr/bin/google-chrome: line 24: mkdir: command not found
/usr/bin/google-chrome: line 45: exec: cat: not found
/usr/bin/google-chrome: line 46: exec: cat: not found
Please help. I use Ubuntu 18.04

Trying to run a venv of python 3.6 on linux as an interpreter but even its activation on terminal is not possible due to the following errors

The command: pyAI3.6/Scripts/activate
The results:
pyAI3.6/Scripts/activate: line 3: $'\r': command not found
pyAI3.6/Scripts/activate: line 4: syntax error near unexpected token $'{\r'' 'yAI3.6/Scripts/activate: line 4: deactivate () {
The command: pyAI3.6/Scripts/activate , works perfectly on windows
please use below command to activate:
source <venv-folder>/bin/activate

How to run a python program in Windows 10 command prompt

I am getting as such error for executing my hello world program:
"This file does not have a program associated with it for performing this action"
1) Download the official version of Python
2) Use custom installation following the screenshots bellow.
3) Run your hello.py file directly from the command line by typing hello.py
Screenshots #1
Screenshots #2
Screenshots #3
I have this python code that I'm running on just by typing Q60471933.py
from datetime import datetime
print("\nHello World\n",datetime.now().strftime("\b%m/%d/%Y\n%H:%M:%S"))
Outputs:
Try this in your command prompt:
python3 hello.py

How to setup global npm module to be executed over cron in mac os x

I have installed a global npm module say it be, 'global-npm-runner'
i have installed global-npm-runner globally with -g
It also needs some arguments to run. So to run on new terminal i simply do
global-npm-runner -E=<my_email> -U="<some_url>"
and it works smoothly
info :
whereis global-npm-runner gives blank
type global-npm-runner gives /usr/local/bin/global-npm-runner
to run the above every 2 minutes i add it to cron like this
*/2 * * * * /usr/local/bin/global-npm-runner -E=<my_email> -U="<some_url>"
but it does
following error when i look into the /var/mail/me
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
Any solution to this problem

Android NDK Compile Protobuf error

I try to compile ProtoBuf 2.5 with NDK.But when I build ProtoBuf 2.5 in eclipse, I get error info as below in console
bash "E:\\Android\\android-ndk-r8e\\ndk-build.cmd" all
E:\Android\android-ndk-r8e\ndk-build.cmd: line 1: #echo: command not found
E:\Android\android-ndk-r8e\ndk-build.cmd: line 2: rem: command not found
E:\Android\android-ndk-r8e\ndk-build.cmd: line 6: rem: command not found
E:\Android\android-ndk-r8e\ndk-build.cmd: line 7: goto: command not found
E:\Android\android-ndk-r8e\ndk-build.cmd: line 8: :FOO: command not found
E:\Android\android-ndk-r8e\ndk-build.cmd: line 27: syntax error: unexpected end of file
I didn't edited ndk-build.cmd.
Please help me! Thandks
It looks like Eclipse is calling ndk-build.cmd, but your shell is a Cygwin/MinGW shell. You need to call the ndk-build script, not ndk-build.cmd

Resources