cablehead / vanilla

Straightforward concurrency for Python
http://vanillapy.readthedocs.org/
MIT License
112 stars 11 forks source link

My experience installing on Ubuntu (precise32 then trusty32 then trusty64) #7

Open mikejohnstn opened 10 years ago

mikejohnstn commented 10 years ago

I know you're not in the business of Linux training but...

I had to apt-get update and then apt-get install python-dev from a fresh precise32 vagrant box. Then I had to apt-get install libffi-dev before python setup.py install would work. Of course, I also had to apt-get install pypy to get pypy. I guess because of the order I did things, I then needed to pip install --upgrade cffi because pypy couldn't find it for some reason (even after messing with my PYTHONPATH and redoing python setup.py install).

After all that, I realized apt-get had installed pypy 1.8 which is incompatible with cffi...so I started from scratch with a trusty32 box. Hooray. Installed pypy right away to confirm it is 2.0+ and did an import cffi to make sure I'm good, and then I had to install both pip and python-dev. Finally python setup.py install was mostly working except for the stupid ffi again. But since pypy 2.0+ comes with cffi I was finally able to import vanilla and get started. I went back and did apt-get install libffi-dev just in case and that made python setup.py install happy again.

Unfortunately I now have a pypy/routes problem (I can import routes in python but not in pypy) and I have to give up for tonight.

And all this makes me think...you might consider writing a short walkthrough for a standard Ubuntu distro on a vagrant box to make it easier for super newbs to get started.

cablehead commented 10 years ago

Oof, thanks Mike.

This is great info.

mikejohnstn commented 10 years ago

I installed and used virtualenv to see if that would help, but it didn't magically fix things. I ended up having to wget http://python-distribute.org/distribute_setup.py then pypy distribute_setup.py to get setuptools working with pypy.

Finally I could pypy setup.py install in the vanilla directory (instead of using python setup.py install) and now pypy can find everything, including routes, and I'm good to go.

cablehead commented 10 years ago

Woop!

Whatcha gonna make!?

I'll leave this issue open until I try out installing from scratch a few times myself, and either find ways to smooth out these issues, or document how to get passed them.

mikejohnstn commented 10 years ago

With trusty32 I was getting an exception:

self.epoll.register(fd, mask)
OverflowError: long int too large to convert to int

So I rebuilt everything using trusty64. I also properly configured a virtualenv for pypy, the magic being virtualenv -p /path-to-pypy/bin/pypy my-pypy-env which nicely symlinks pypy to python. Everything seems to be working now (don't forget to map a port in Vagrantfile).

cablehead commented 10 years ago

Nice!

Thanks for the update.

BTW, just watch I merged in a large update. There's no rush to pull if you don't want to deal with the updates. There's no more channel anymore. The main primitive is now h.pipe() which returns a sender and a recver.

mikejohnstn commented 10 years ago

Chau, channel. FWIW I found the connected example helpful (saw you removed it).

cablehead commented 10 years ago

Oh.. Kk, I can bring it back.— Sent from Mailbox

On Mon, Aug 4, 2014 at 9:47 PM, Mike Johnston notifications@github.com wrote:

Chau, channel. FWIW I found the connected example helpful (saw you removed it).

Reply to this email directly or view it on GitHub: https://github.com/cablehead/vanilla/issues/7#issuecomment-51149642