Live data from Hacker News

'New' Python modules of 2015

blog.rtwilson.com

31–40 of 137 posts

Re: 'New' Python modules of 2015

#32
post #22

We've transitioned our local/dev/prod instances to use conda on Heroku, and couldn't be happier. It was a tiny bit of work to get it set up, but now everything is consistent, and we can set up new local environments in seconds.

So I have been considering this. does conda track pypi or does it lag it? I have been concerned about moving over my requirements.text for a webapp with lots of dependencies

Re: 'New' Python modules of 2015

#33
post #22

We've transitioned our local/dev/prod instances to use conda on Heroku, and couldn't be happier. It was a tiny bit of work to get it set up, but now everything is consistent, and we can set up new local environments in seconds.

So I have been considering this. does conda track pypi or does it lag it? I have been concerned about moving over my requirements.text for a webapp with lots of dependencies

It slightly lags, but you can include pip requirements in an environment.yml file, and they install normally.

I really only use conda for the non-python bits of our stack: numpy/scipy/pandas etc - packages that are a pain to install on Heroku.

Re: 'New' Python modules of 2015

#34
post #22

We've transitioned our local/dev/prod instances to use conda on Heroku, and couldn't be happier. It was a tiny bit of work to get it set up, but now everything is consistent, and we can set up new local environments in seconds.

So I have been considering this. does conda track pypi or does it lag it? I have been concerned about moving over my requirements.text for a webapp with lots of dependencies

We have to use a mix of pypi and conda since quite a few of our dependencies are not in conda. We have a script which checks conda first, then falls back to pypi, all from one requirements.txt

Re: 'New' Python modules of 2015

#35

Interesting list. I love Anaconda! A few years ago I tried to set up a Mac with a scientific computing stack and it took me days to hack my way through all the various dependencies and incompatible versions. Anaconda now lets me do that in a minutes.

While there are certainly advantages to Anaconda, I've never encountered any troubles installing Pandas, NumPy, SciPy, or scikit-learn on any OS X or linux system. In my experience, getting GCC up and running is far more of a pain in the ass (and it usually isn't even that bad).

I use pyenv[1] and pyenv-virtualenv[2] to easily keep track of Python versions and virtual environments. I keep one virtual environment for each project I'm working on, and things prettymuch Just Work.

[1]: https://github.com/yyuu/pyenv

[2]: https://github.com/yyuu/pyenv-virtualenv

Re: 'New' Python modules of 2015

#36
post #10

Interesting list. I love Anaconda! A few years ago I tried to set up a Mac with a scientific computing stack and it took me days to hack my way through all the various dependencies and incompatible versions. Anaconda now lets me do that in a minutes.

Me too...I taught a python class by making everyone download Anaconda's distribution of 3.x...and everyone could do the assignments no matter what kind of computer they used. Anaconda does a little too much for me to have it be my own default install but it does quite well in on boarding beginners. I use pyenv to install maintain Anaconda on my own machine when I need to replicate student work

Yep, on Windows, Anaconda is a godsend.

Re: 'New' Python modules of 2015

#37
post #23
post #18

Earlier quoted context omitted.

What does it do that ends up being a little too much for your use?

It takes precedence in the path over everything...and in the last version I used (before I upgraded to OS X El Capitain and wiped out everything), things like `curl` were provided [1] ...which I completely understand for Anaconda's use case, but it caused a lot of confusing grief to me when I hadn't expected that and OpenSSL was having its rough times. I don't know if that's the case (curl being part of the package)…

> And finally...well, I have to admit it, but I use Python like a goddamned moron in that I still don't know how to use virutalenv/venv to do proper dev isolation.

I was the same way for quite a while, until I bumped into pyenv-virtualenv[1]. Just install that plugin, and you can do, eg,

    pyenv virtualenv 3.5.1 my-project
to get a virtual environment called `my-project` based off of Python 3.5.1 (assuming that you've installed 3.5.1 via pyenv, of course). Or, you can just do

    pyenv virtualenv my-project
to make a virtualenv called `my-project` based off of the current version of Python that you're using.

Once you do that, pyenv treats `my-project` just as another installation of Python. In fact, `my-project` will show up in the list of installed versions (`pyenv versions`), and you can switch to it:

    pyenv global my-project
(Or you can switch at the local or shell levels. Whichever.)

And voila! You have your own virtual environment that can contain its own list of libraries.

And no, I'm not a shill for the creator of pyenv, I just really like the software.

[1]: https://github.com/yyuu/pyenv-virtualenv

Re: 'New' Python modules of 2015

#40

I really like lists like this. I get updates daily on which of my github friends (is that what they're called?) have starred and there is no real reason why they're following a project. I can look at the README and guess. I did see someone start following this project the other day https://github.com/elastic/elasticsearch-dsl-py , which seems pretty interesting. Has anyone used it?

It's something like Django models but with Elasticsearch. You can create object classes and then save them to Elasticsearch, query them, etc. It's built on the lower-level https://github.com/elastic/elasticsearch-py. Very handy.
Post reply on HN