Stata/Python integration part 1: Setting up Stata

python integration is one of the most exciting features in stata 16. there are thousands of free python packages that you can use to access and process data from the internet, visualize data, explore data using machine-learning algorithms, and much more. you can use these python packages interactively within stata or incorporate python code into your do-files. and there are a growing number of community-contributed commands that have familiar, stata-style syntax that use python packages as the computational engine. but there are a few things that we must do before we can use python in stata. this blog post will show you how to set up stata to use python.
download and install python
you may already have python installed on your computer. you can check by typingpython searchin stata.
the result tells us that no python installations were found, so i will need to install python. you may need to consult your system administrator if you are not the owner or administrator of the computer you are using.
you can download an installation file for python at thepython download website. python is available for linux, mac, and windows, so you should select the installation file that corresponds to your operating system. you should select a 64-bit installation file because stata/python integration works only with 64-bit processors. python 3.8.5 is the current version as i am writing this post, and i recommend using the latest version. older versions of python are available for download if you need them for backward compatibility, but versions older than python 3.0 have now reached “end of life” status.
after you download the installation file, simply run it and follow the setup instructions. i have recorded a video that shows how to download and install python for windows 10 on a 64-bit computer.
download and install anaconda/python
python is also included in an open-source development environment called anaconda. many people prefer anaconda because it automatically installs and manages many python packages during installation. you can download the appropriate anaconda installation file at theanaconda download website. anaconda is also available for linux, mac, and windows, and you should select the 64-bit installation file that corresponds to your operating system. after you download the installation file, simply run it and follow the setup instructions. i have recorded a video that shows how to download and install anaconda for windows 10 on a 64-bit computer.
setting up stata to use python
after you install python or anaconda, or both, on your computer, you can return to stata and again typepython searchin the command window.
i have installed both python 3.8 and anaconda 3.0 on my computer. i can tell stata which python installation i wish to use with theset python_execcommand. the example below tells stata that i wish to use python 3.8.
you can typepython queryto see which python installation you are currently using.
you can useset python_userpathto set additional paths for python to look up packages and modules that you create or download. the example below usesset python_userpathto add the folder where i save my personal python modules.
you can typepython queryto see which python installation you are currently using.
now we’re ready to use python within stata! you can begin using python interactively by typingpythonin the command window. stata will remind you that you can typeendto exit python and return to stata. the example below uses python toprint()the sentence “hello stata, i am python” to the screen.
it worked! this blog post is the first in a series that i am writing to show you how to use python within stata. my goal is to provide a basic foundation so that you will have the skills to explore python packages that are useful to you. this post demonstrated how to install python and set up stata to use python. in my next post, i will demonstrate several ways to use python from within stata.
近期,武汉大学经济与管理学院联合stata软件中国授权经销商北京天演融智软件有限公司(科学软件网)在七-八月份举办stata系列专题讲座以及stata软件研讨会,得到了大家的一致**。在此,科学软件网为大家提供三场讲座的回放以及“stata洞察数据科学研讨会” 中李春涛老师主讲的主题为 “中文地图与stata” 和 肖光恩老师主讲的主题为 “新冠疫情数据的可视化与建模方法” 的演讲回放视频,全部免费,可直接扫码(页面下方直接点 试听)免费观看。
北京天演融智软件有限公司(科学软件网)是stata软件在中国的授权经销商,为中国的stata用户提供优质的软件销售和培训服务。
北京天演融智软件有限公司专注于matlab,stata,spsspro,pscad,gams,nvivo,cyme,gms,mathematica等

打印机禁用360怎么办
医学研究院转让
牛墨石墨烯地暖为什么节能
蜂行动合伙人-联通沃行销码上购-蜂行动合伙人招募计划
生产气泡膜-南京气泡膜-禄诚包装
Stata/Python integration part 1: Setting up Stata
法兰螺母图片-成都法兰螺母-垚北*震支架价格查询(查看)
青岛李沧办理卫生许可资
自动抽油烟机电机接线方法
南开名包典当-名包典当回收-津成典当(推荐商家)
HTF-I-8消防排烟风机-莱州消防排烟风机-星创暖通现货供应
五线谱电教板建设公司-北京鑫三芙(推荐商家)
福乐伟卧螺离心机维修
润康机械(图)-HRM辊套-云南辊套
红叶石楠大杯-金华好彩苗木规格齐全-红叶石楠大杯种植基地
半挂车车厢滑板冲击半挂车车厢滑板 半挂车车厢滑板源头
河南光伏板-光伏板清洗-昕洁新能源(诚信商家)
合肥防腐木木桥-合肥旺发|品类齐全-防腐木木桥施工
佳能复印机载体多了怎么办
阜新微纳米气泡水-富氢水微纳米气泡水使用案例-禹创环境
拨打报修电话