fogleman / primitive

Reproducing images with geometric primitives.
https://primitive.lol/
MIT License
12.35k stars 608 forks source link

Not recognizing primitive as a command #51

Closed vanilla-willa closed 7 years ago

vanilla-willa commented 7 years ago

Hi!

I'm having trouble trying to run primitive after following the instructions. It's similar to another open issue but not quite the same.

When I use "go get -u github.com/fogleman/primitive", should I be expecting any output? I don't see anything, but there's a pause which makes it seems like it's fetching the dependencies. When it stops, there aren't any new directories or files in my current directory. But when I try "primitive -i input.png -o output.png -n 100" (filling in the input.png and output.png with my image name), I get an error message saying "'primitive' is not recognized as an internal or external command, operable program or batch file." I tried this both on my Windows machine and a virtual machine running Linux.

Is this something that has occurred before? Are there any other steps I should take or check?

Thank you!

fogleman commented 7 years ago

go get will put the binary in $GOPATH/bin. With Go 1.8+, GOPATH defaults to $HOME/go.

Put $GOPATH/bin on your PATH to be able to run primitive from any location.

duhaime commented 7 years ago

@vanilla-willa Are you on OSX? If so, add this to your bash profile:

######
# GO #
######

export GOPATH=/Users/YOUR-USERNAME-HERE/go
export PATH=$GOPATH/bin:$PATH

then run source ~/.bash_profile then reinstall the package go get -u github.com/fogleman/primitive. If you then type which primitive you should get a response...

fogleman commented 7 years ago

Thanks @duhaime!

kshitijpurwar commented 6 years ago

👍