TG seems broken at the moment, installing on Ubuntu server 11.10
install seemed successful...
but paster serve gives me
from repoze.what.plugins.pylonshq import booleanize_predicates
ImportError: No module named pylonshq
and just running paster stand-alone gives me
from peak.util.decorators import decorate_assignment, decorate,
struct, \ ImportError: No module named decorators
Python 2.7 Tg 2.1
tg.devtools-2.1.4-py2.7.egg
"2.1.4 is already the active version..."
This happens regardless of if I've run python setup.py develop on an
empty app
I just, from scratch, ran the following commands and got a working environment. I use Doug Hellman's virtualenvwrapper, so that's the minor difference at the beginning from normal:
On Fri, Apr 6, 2012 at 2:50 PM, Jim Carroll <mrma...@gmail.com> wrote: > TG seems broken at the moment, installing on Ubuntu server 11.10 > install seemed successful... > but paster serve gives me > from repoze.what.plugins.pylonshq import booleanize_predicates > ImportError: No module named pylonshq > and just running paster stand-alone gives me > from peak.util.decorators import decorate_assignment, decorate, > struct, \ ImportError: No module named decorators > Python 2.7 Tg 2.1 > tg.devtools-2.1.4-py2.7.egg > "2.1.4 is already the active version..."
> This happens regardless of if I've run python setup.py develop on an > empty app
> What could I be doing wrong?
> -- > You received this message because you are subscribed to the Google Groups > "TurboGears" group. > To post to this group, send email to turbogears@googlegroups.com. > To unsubscribe from this group, send email to > turbogears+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/turbogears?hl=en.
File "/usr/local/lib/python2.7/dist-packages/TurboGears2-2.1.4-
py2.7.egg/tg/configuration.py", line 680, in add_auth_middleware
from repoze.what.plugins.pylonshq import booleanize_predicates
ImportError: No module named pylonshq
investigating:
$ easy_install repose.what
repoze.what 1.0.9 is already the active version in easy-install.pth
>>> import repose.what.plugins as p
ImportError: No module named repose.what.plugins
So all I seem to need are the repoze pylons plugins.... hmmm...
The pylonshq module should be in the repose.what_pylons package... so
I did:
sudo easy_install -i http://tg.gy/ repoze.what_pylons
Searching for repoze.what-pylons
Best match: repoze.what-pylons 1.0
Processing repoze.what_pylons-1.0-py2.7.egg
repoze.what-pylons 1.0 is already the active version in easy-
install.pth
But still get
File "/usr/local/lib/python2.7/dist-packages/TurboGears2-2.1.4-
py2.7.egg/tg/configuration.py", line 680, in add_auth_middleware
from repoze.what.plugins.pylonshq import booleanize_predicates
ImportError: No module named pylonshq
> The pylonshq module should be in the repose.what_pylons package... so > I did:
> sudo easy_install -i http://tg.gy/ repoze.what_pylons > Searching for repoze.what-pylons > Best match: repoze.what-pylons 1.0 > Processing repoze.what_pylons-1.0-py2.7.egg > repoze.what-pylons 1.0 is already the active version in easy- > install.pth
> But still get
> File "/usr/local/lib/python2.7/dist-packages/TurboGears2-2.1.4- > py2.7.egg/tg/configuration.py", line 680, in add_auth_middleware > from repoze.what.plugins.pylonshq import booleanize_predicates > ImportError: No module named pylonshq
> -- > You received this message because you are subscribed to the Google Groups > "TurboGears" group. > To post to this group, send email to turbogears@googlegroups.com. > To unsubscribe from this group, send email to > turbogears+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/turbogears?hl=en.
I'm on a dedicated machine. It's a virtual machine with a dedicated
environment.
If I created a virtual machine... I'd have to automate that at boot
time and all that.
On Apr 6, 5:16 pm, Jim Carroll <mrma...@gmail.com> wrote:
> I'm on a dedicated machine. It's a virtual machine with a dedicated
> environment.
> If I created a virtual ____environment____... I'd have to automate that at boot
> time and all that.
I activate my own virtual environment on my personal machine all the
time.
But this server is going to just have one project on it ever.
Sorry for taking so long. Been wrapping up my Friday.
We recommend using virtualenv. Strongly. virtualenv allows for what amounts to a private installation of Python, giving *only* the packages that are required to run TG itself. There's no automation of it, either. Instead of runing /usr/bin/python you would run (for example) /home/user/myproject/bin/python
And that's all the automation required. If you're using mod_wsgi, you point it at *that* installation of Python instead of the default system installation. It really does make life much easier for managing the installation of TG or, indeed, of any other complex Python program. Check out its description and documentation at http://pypi.python.org/pypi/virtualenv
I promise you that once you start using it, and see the benefits, you're not going to want to install any Python program any other way.
Now, to address your other issue, the "conflicting" packages: setuptools (and distribute, and pip) all support the idea of namespace'd packages. As a result, you can have packages that look like they're going to conflict, but in reality are actually loaded into the correct place in the hierarchy, allowing to do exactly what has been done with the repoze packages.
Now, I need to get to releasing 2.1.5. Pretty sure I just need to make the announcement, push the tags, and let it fly.
On Fri, Apr 6, 2012 at 5:18 PM, Jim Carroll <mrma...@gmail.com> wrote: > On Apr 6, 5:16 pm, Jim Carroll <mrma...@gmail.com> wrote: > > I'm on a dedicated machine. It's a virtual machine with a dedicated > > environment. > > If I created a virtual ____environment____... I'd have to automate that > at boot > > time and all that.
> I activate my own virtual environment on my personal machine all the > time. > But this server is going to just have one project on it ever.
> -- > You received this message because you are subscribed to the Google Groups > "TurboGears" group. > To post to this group, send email to turbogears@googlegroups.com. > To unsubscribe from this group, send email to > turbogears+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/turbogears?hl=en.
Alright, thanks. With a virtual environment, I have it working.
I would expect turbogears to work in a normal Python environment,
maybe I'm just old fashioned.
Well it works also in a normal python environment, but you will have to check the versions requirements of the various packages you have installed in your environment.
Some of them might obviously collide and that is the reason why virtualenv has been created.
I would suggest you to always use virtualenv for all your projects, you will avoid issues with version conflicts with every package or framework you use, not only TurboGears.
On Mon, Apr 9, 2012 at 5:52 PM, Jim Carroll <mrma...@gmail.com> wrote: > Alright, thanks. With a virtual environment, I have it working. > I would expect turbogears to work in a normal Python environment, > maybe I'm just old fashioned.
On Mon, Apr 09, 2012 at 10:49:43PM +0200, Alessandro Molina wrote: > I would suggest you to always use virtualenv for all your projects, > you will avoid issues with version conflicts with every package or > framework you use, not only TurboGears.
Is that also how you run your production environments? I've got a development virtualenv but still working out how best to deploy my project; either as me deploying it or writing up some document to tell others how to do it.
- Craig -- Craig Small VK2XLZ http://enc.com.au/ csmall at : enc.com.au Debian GNU/Linux http://www.debian.org/ csmall at : debian.org GPG fingerprint: 5D2F B320 B825 D939 04D2 0519 3938 F96B DF50 FEA5
On Mon, Apr 9, 2012 at 10:58 PM, Craig Small <csm...@enc.com.au> wrote: > On Mon, Apr 09, 2012 at 10:49:43PM +0200, Alessandro Molina wrote: > > I would suggest you to always use virtualenv for all your projects, > > you will avoid issues with version conflicts with every package or > > framework you use, not only TurboGears.
> Is that also how you run your production environments? I've got a > development virtualenv but still working out how best to deploy my > project; either as me deploying it or writing up some document to tell > others how to do it.
> -- > You received this message because you are subscribed to the Google Groups > "TurboGears" group. > To post to this group, send email to turbogears@googlegroups.com. > To unsubscribe from this group, send email to > turbogears+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/turbogears?hl=en.