Closed jabiertxof closed 2 years ago
So, I tried to reproduce this but couldn't. Here's the steps I took (this presumes you've already run install_dependencies.sh
, which from your error I presume you did)
mkvirtualenv clean-shoebot
)pip install pycairo pygobject pillow meta pubsub
import shoebot
bot = shoebot.create_bot(outputfile="output.svg")
bot.size(400,400)
bot.rect(10,10,100,100)
bot.finish()
This creates the file as expected. Are you inside the base shoebot/
dir? Can you import shoebot
without error?
Thanks for reporting this, I guess the module docs/troubleshooting might need an update since this is something that should just work.
I usualy never run python scripts to install, download the required packages ans place along my code so I go to pipy page and downoad meta and pubsub and place along shoebot folder (maybe I have miss pycairo and pygobject I supose is systemwide on my system) test tommorow at work (at home has all shoebot instaled by mistake)
Also want to have SVG only output so comment in source code PILL calls.
Maybe in the future need PDF but dont want to install PILL/PILLOW on my server
Good, let us know how it went when you get to try it.
You make a good point about Pillow -- it should only be needed if image() is used. Maybe we can try to remove it from the initial imports and only make image() and friends depend on it.
Ok tomorrow give a look
It looks like that may be an old version ?
I think downloading packages individually used to be the norm when I started using python, but it's a bit more unusual.
Is it because you find there is more control, vs using pip
to install things from pypi ?
I want less packages limited to minimun on server and control myself. I got it. My issue become from bot.py SBOT_ROOT. if I change to current folder it works. I only need to comment 2 times PILL/OW I have a beauty SVG, thanks!
That's fair enough.
I tend to use virtualenv for this (well for all my projects), it's handy as you can make a new one to test something and delete it afterwards, or have one to try out something that needs different versions of things.
My issue become from bot.py SBOT_ROOT. if I change to current folder it works.
This is great! Can you share how you changed SBOT_ROOT?
We also made it so that Pillow is only needed if you use image() (https://github.com/shoebot/shoebot/pull/402) -- thanks for reporting this one.
I put a fixed path into into bot.py SBOT_ROOT variable :( to try.
Maybe we can use file on bot.py to add relative path
Great the Pillow fix!
Great to know PNG dont need it! Is possible add PDF format from cairo?
thanks stuaxo. Virtualenv is a good thing always to help safe installs.
@jabiertxof my favourite way of using virtualenv is virtualenvwrapper.
One problem with plain virtualenv is that it's easy to end up with a lot of them in various places in the filesystem.
With virtualenvwrapper they all live under ~/.virtualenvs
then I can create them, list them and remove them with
mkvirtualenv, lsvirtualenv, rmvirtualenv.
Apologies, if you are already familiar :)
I know but never use so no need to be sorry! Thanks so much for trying to help me. also not know vistualenvwrapper!
Cool, it's sometimes hard to get a balance between telling people something useful or going too far the other way and being patronising.
Yes social can be dificult sometimes but have good try is a + to it. Thanks again!
Hi @jabiertxof does this need more support, or can I close this ? Virtualenv / virtualenvwrapper is probably the way to go if you want isolation from the system - running apps manually isn't a standard thing.
I'm happy to look at changing SBOT_ROOT if that can help though.
Cheers Stuart
Yes you can close I hardcore in my systems
Obtener TypeApp para Android
En 28 may. 2021 19:15, en 19:15, Stuart Axon @.***> escribió:
Hi @jabiertxof does this need more support, or can I close this ? Virtualenv / virtualenvwrapper is probably the way to go if you want isolation from the system - running apps manually isn't a standard thing.
I'm happy to look at changing SBOT_ROOT if that can help though.
Cheers Stuart
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/shoebot/shoebot/issues/400#issuecomment-850557856
Paste the change you made was first though. If it's something I can change that's straightforward I'll try and do it, but if it's something where I end up fighting pip it may have to stay as-is.
Is there a way to use python import module without instaling shoebot? I try to work with minimun rquerinments:
In my try I be blocked by this: