haltakov / simple-photo-gallery

Beautiful and simple photo galleries that help you tell your story. Free and open-source.
https://haltakov.net/simple-photo-gallery
MIT License
194 stars 51 forks source link

Not running from command line #100

Open Pieterdebier opened 3 years ago

Pieterdebier commented 3 years ago

When I follow the instructions:

pip install simple-photo-gallery then move to a folder containing my photos then run gallery-init I get command not found: gallery-init Apparently there is something else I need to do before it runs

Can you please update that in the instructions

haltakov commented 3 years ago

Hmm, this is strange. I haven't heard about this problem before.

Can you please provide some more information:

Pieterdebier commented 3 years ago

Hi Vladimir,

I am running Python 3.8.2 on a macbook pro with OS11.1

I have the impression that everything is installed well but that the path is not set correctly, I remember to have had something similar in the past with another application but I don't recall how I solved it.

Thx,

Pieter

On Mon, Jan 18, 2021 at 9:11 PM Vladimir Haltakov notifications@github.com wrote:

Hmm, this is strange. I haven't heard about this problem before.

Can you please provide some more information:

  • Operating system
  • Python version
  • Do you use some virtual environment (for example conda, venv, etc.)?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/haltakov/simple-photo-gallery/issues/100#issuecomment-762449975, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3H4M6WYSSOGY4NLPMGPK3S2SIULANCNFSM4WGOW62A .

haltakov commented 3 years ago

Hi Pieter,

OK, I tried now on my Mac with OS10.15. For me it works without a problem, however I'm using anaconda for virtual environments, so the setup is a bit different.

What you can try is to run the following commands:

pip uninstall simple-photo-gallery
pip install simple-photo-gallery -v

This will uninstall the tool and install it again. The -v option will just make it print more information. In the end you will see something like this:

Installing collected packages: simple-photo-gallery

  changing mode of /Users/vladimir/anaconda3/envs/test-spg/bin/gallery-build to 755
  changing mode of /Users/vladimir/anaconda3/envs/test-spg/bin/gallery-init to 755
  changing mode of /Users/vladimir/anaconda3/envs/test-spg/bin/gallery-upload to 755
Successfully installed simple-photo-gallery-1.4.0

This means that on my system, gallery-init is installed in /Users/vladimir/anaconda3/envs/test-spg/bin/gallery-init. You will need to add this to your PATH variable.

Can you please share the path so I can investigate a bit further and update the documentation?

Thanks! Vladimir

haltakov commented 3 years ago

Any success?

Pieterdebier commented 3 years ago

Hi Vladimir,

I did as you recommended, I uninstalled and installed again with -v

I added "/Library/Frameworks/Python.framework/Versions/3.8/bin/gallery-init" to my path (as you can see from my echo command)

The "Photo Gallery" is a folder in my projects folder.

pbve@MBP-van-Patrick Photo Gallery % echo $PATH

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin/gallery-init

pbve@MBP-van-Patrick Photo Gallery % gallery-init

zsh: command not found: gallery-init

pbve@MBP-van-Patrick Photo Gallery %

I appreciate the support, cheers,

Pieter

On Sat, Jan 23, 2021 at 2:00 PM Vladimir Haltakov notifications@github.com wrote:

Any success?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/haltakov/simple-photo-gallery/issues/100#issuecomment-765993314, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3H4M2AM3JAWJHDG6NDVTLS3LBYTANCNFSM4WGOW62A .

haltakov commented 3 years ago

I think the right way is to add /Library/Frameworks/Python.framework/Versions/3.8/bin to PATH (so without the gallery-init at the end). It should be the directory that contains the executable.

Pieterdebier commented 3 years ago

Great, thanks, that did the trick.

Pieter

On Sun, Jan 24, 2021 at 1:40 PM Vladimir Haltakov notifications@github.com wrote:

I think the right way is to add /Library/Frameworks/Python.framework/Versions/3.8/bin to PATH (so without the gallery-init at the end). It should be the directory that contains the executable.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/haltakov/simple-photo-gallery/issues/100#issuecomment-766341527, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3H4M5NJJEHT4JBQTA3M6TS3QIKLANCNFSM4WGOW62A .

haltakov commented 3 years ago

Cool, thanks! I'll update the documentation with this guide.