Sublime on Mac OSX: /bin/sh: love: command not found

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
callcenterhero
Prole
Posts: 3
Joined: Wed May 11, 2016 2:16 pm

Sublime on Mac OSX: /bin/sh: love: command not found

Post by callcenterhero »

Hey friends. I have the licensed version of Sublime Text 3 on Mac OSX 10.10 Yosemite. I installed all necessary packages according to the wiki page: https://love2d.org/wiki/Sublime_Text

This includes installing the packages to sublime, creating a build setup and adding love to my Mac's PATH variable (located in ~/.profile).

Whenever I try to "build" my code in Sublime, it errors out with the following input:

Code: Select all

/bin/sh: love: command not found
[Finished in 0.1s with exit code 127]
[cmd: ['love ']]
[dir: /Users/andrewcarr/Google Drive/GameDev/LUA/FuckinAround]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
However, I'll enter "love" into the Mac's Terminal and the program comes right up.

Any idea what could be causing this to happen?
User avatar
pgimeno
Party member
Posts: 3548
Joined: Sun Oct 18, 2015 2:58 pm

Re: Sublime on Mac OSX: /bin/sh: love: command not found

Post by pgimeno »

I've no idea about Sublime, but...
callcenterhero wrote:

Code: Select all

[cmd: ['love ']]
... there seems to be an extra space there. 'love ' is not the same as 'love'.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Sublime on Mac OSX: /bin/sh: love: command not found

Post by bartbes »

As you can see, sublime does not use the modified PATH you set in your .profile. This is likely because .profile is not always read, and I assume OSX does not read it before executing GUI applications. The easiest way is probably so specify a full path to love.
callcenterhero
Prole
Posts: 3
Joined: Wed May 11, 2016 2:16 pm

Re: Sublime on Mac OSX: /bin/sh: love: command not found

Post by callcenterhero »

i could probably do that. Where in sublime would I specify the full path?
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Sublime on Mac OSX: /bin/sh: love: command not found

Post by slime »

Try editing/creating ~/.bash_profile instead of ~/.profile when adding love to PATH.
callcenterhero
Prole
Posts: 3
Joined: Wed May 11, 2016 2:16 pm

Re: Sublime on Mac OSX: /bin/sh: love: command not found

Post by callcenterhero »

It's weird. I am making everyone's suggested changes and it's like Sublime doesn't notice them. I set the build system, build a new build system, run "build with"... nothing. I don't know what I'm doing wrong

Another thing is that I can't figure out is how to get it to stop opening with /bin/sh. Mac OSX almost never uses that tool.../bin/bash is the default terminal. and the "love" command works just fine in bash. /bin/sh, however, does NOT recognize the love command. I can't figure out how to get sublime to notice that bash exists... it would be so much easier to just use that program instead.

Any other suggestions? I appreciate the help but I'm starting to run out of ideas. Sublime works just fine with Love on Windows 10... I don't understand why it's gotta be so damn difficult on Mac OS X lol :(
User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

Re: Sublime on Mac OSX: /bin/sh: love: command not found

Post by qubodup »

Hey,

I tried to make the instructions clear in https://www.youtube.com/watch?v=sVZv3JePH60

The space in the path "Google Drive" might be the cause. Try running the build in a path that has no spaces.

.profile and .bash_profile changes might only register after logging in again. As seen on https://love2d.org/wiki/PATH , run the following in a terminal to make it work for the current session;

Code: Select all

export PATH=$PATH:/Applications/love.app/Contents/MacOS/
Hope it will eventually work.
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
User avatar
Rucikir
Party member
Posts: 129
Joined: Tue Nov 05, 2013 6:33 pm

Re: Sublime on Mac OSX: /bin/sh: love: command not found

Post by Rucikir »

There is another page on this in the wiki Getting Started : Mac OS X.
See this answer on superuser.com that provides other solutions to your problem.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 83 guests