欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

Numpy, Scipy, and Pandas – Oh My! (Ubuntu 1

系統 3081 0

Numpy, Scipy, and Pandas – Oh My! (Ubuntu 11.10) ? Adam Klein's Blog

I’ve got a spanking new install of Kubuntu 11.10, and I need to get it set up for Python data hacking. ?Sure, I could spring for an Enthought Python Distrubution , but where would be the masochism in that?

Inspired by? Zed , let’s do this the hard way.

The linux distro comes with Python 2.7.2. Perfect! Or, use Pythonbrew ?to set up a local Python build that you want to use. I presume you know how to get to the command line, as well as how to edit text files using emacs, vim, pico, whatever.

Let’s get some tools:

sudo apt-get install git gfortran g++

We need to compile against Python headers and get setuptools and pip:

sudo apt-get install python-dev python-pip

Let’s isolate our Python distro from carnage:

sudo apt-get python-virtualenv
sudo pip install virtualenvwrapper

Now these lines to your ~/.bashrc:

source / usr / local / bin / virtualenvwrapper.sh
export WORKON_HOME = $HOME / .virtualenvs

Now open a new terminal and establish a virtual environment, say “py27″:

mkvirtualenv py27
workon py27

We need some math libraries (ATLAS + LAPACK):

sudo apt-get install libatlas-base-dev liblapack-dev

Ok, now to install and build all the scientific python hotness:

pip install numpy scipy

For matplotlib, we need lots of libraries. This one is dependency heavy. Note we can ask Ubuntu what we need, what’s installed, and what is not:

apt-cache depends python-matplotlib | awk '/Depends:/{print $2}' | xargs dpkg --get-selections

Easiest thing to do is just build all the dependencies (just say yes if it asks to install deps of matplotlib instead of python-matplotlib):

sudo apt-get build-dep python-matplotlib

Ok, now this should work:

pip install matplotlib

Now, of course, we need the IPython interpreter. Don’t settle for 0.11!

pip install -e git +https: // github.com / ipython / ipython.git #egg=ipython
cd ~ / .virtualenvs / py27 / src / ipython
python setupegg.py install

Note, you may need to sudo rm /usr/bin/ipython.py if there is a conflict.

Ok, let’s beef up the IPython interpreter. Note the pip commands FAIL. This is ok. We’ll do it by hand.

sudo apt-get install qt4-dev-tools

pip install sip
cd ~ / .virtualenvs / py27 / build / sip
python configure.py
make
sudo make install

pip install pyqt
cd ~ / .virtualenvs / py27 / build / pyqt
python configure.py
make
sudo make install

# clean up
cd ~ / .virtualenvs / py27 /
rm -rf build

Just a few more things, you won’t be disappointed.

sudo apt-get install libzmq-dev
pip install tornado pygments pyzmq

Alright, let’s get pandas . It’s under heavy development ( Wes is a beast); so lets pull the latest from git.

pip install nose cython
pip install -e git +https: // github.com / wesm / pandas #egg=pandas

# we should get statsmodels too
pip install -e git +https: // github.com / statsmodels / statsmodels #egg=statsmodels

Btw, you’ll note this git stuff goes into your ~/.virtualenvs/py27/src directory, if you want to git pull and update.

OK! Phew! For the grand finale:

Run the amazing qtconsole:

ipython qtconsole --pylab =inline

Or the even more amazing WEB BROWSER:

ipython notebook --pylab =inline

Launch a browser and point to http://localhost:8888/. For kicks, try opening one of Wes’s tutorial workbooks, here . You may have to fiddle a bit, but it should work.

Enjoy!

Numpy, Scipy, and Pandas – Oh My! (Ubuntu 11.10) ? Adam Klein's Blog


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 亚洲va国产va | 久久亚洲国产成人影院 | 91精品观看91久久久久久国产 | 日韩国产欧美在线观看一区二区 | 国产精品美女久久久久久免费 | 亚洲精品一区二区 | 精品成人A片久久久久久船舶 | 人人九九精品 | 久久精品一区 | 国产精品99一区二区三区 | 美女午夜影院 | 91精品国产乱码久久久久久久久 | 国产视频中文字幕 | 一区二区三区四区国产 | 99久久国产综合精品2020 | 加勒比AV一本大道香蕉大在线 | 日韩欧美在线视频 | 成人精品一区二区三区 | 欧美日韩综合视频 | 色呦呦tv| 自拍偷拍视频网站 | 99热久久是国产免费66 | 搡女人视频免费 | 精品在线观看国产 | 天堂亚洲网 | 免费观看性欧美一级 | 国产精品久久久久久久久免费 | 国产精品亚洲天堂 | 国产精品夜色一区二区三区 | 夜夜摸视频网 | 国产免费一级高清淫日本片 | 精品久| 欧美一级毛片在线看视频 | 精品欧美成人高清视频在线观看 | 搞黄网站免费观看 | 五月丁香啪啪. | 网友自拍视频在线 | 激情大乳女做爰办公室韩国 | 国产成人精品福利网站在线观看 | 天天操天天操天天操天天操 | 福利视频中文在线观看 |