[{"data":1,"prerenderedAt":229},["ShallowReactive",2],{"/py/setup":3,"/py/setup-surround":218},{"id":4,"title":5,"body":6,"description":184,"extension":185,"meta":186,"navigation":204,"path":214,"seo":215,"stem":216,"__hash__":217},"content/py/setup.md","Python Extension Dictionary: setup",{"type":7,"value":8,"toc":173},"minimark",[9],[10,11,15,16,15,26,47,56,59,62,111,116,145,148,159,162],"div",{"className":12,"id":14},[13],"dict_entry","setup","\n  ",[17,18,20,21,15],"h3",{"id":19},"pysetup","\n    ",[22,23,25],"a",{"href":24},"#setup","py:setup",[27,28,32],"h4",{"id":29,"className":30},"pysetup-python-executable",[31],"section-heading",[22,33,20,37,15],{"className":34,"href":36},[35],"section-anchor","#----pysetup-python-executable--",[38,39,42,43],"span",{"className":40},[41],"prim_example","py:setup ",[44,45,46],"i",{},"python-executable",[48,49,50,51,55],"p",{},"Create the Python session that this extension will use to execute code. The session will be started with the given Python executable. This command ",[52,53,54],"em",{},"must"," be run before running any other Python extension primitive. Running this command again will shutdown the current Python environment and start a new one.",[48,57,58],{},"The executable may be specified as a relative path, absolute path, or just the executable name if it is on your PATH.\nFurthermore, this extension offers a few helper primitives for getting particular versions of Python in system\nindependent ways.",[48,60,61],{},"In general, unless working with a virtual environment or a specific system setup, you should do:",[63,64,65],"pre",{},[66,67,68,73,74,78,79,84,87,73,90,73,94,98,100,73,103,73,107],"code",{},[38,69,25],{"className":70},[71,72],"token","variable"," ",[38,75,77],{"className":76},[71,72],"py:python","  ",[38,80,83],{"className":81},[71,82],"comment","; if your code works with either Python 2 or 3",[85,86],"br",{},[38,88,25],{"className":89},[71,72],[38,91,93],{"className":92},[71,72],"py:python3",[38,95,97],{"className":96},[71,82],"; for Python 3",[85,99],{},[38,101,25],{"className":102},[71,72],[38,104,106],{"className":105},[71,72],"py:python2",[38,108,110],{"className":109},[71,82],"; for Python 2",[48,112,113,115],{},[66,114,25],{}," may be invoked by directly referring to different Pythons as well. For instance:",[63,117,118],{},[66,119,120,73,123,73,128,132,134,73,137,78,141],{},[38,121,25],{"className":122},[71,72],[38,124,127],{"className":125},[71,126],"string","\"python3\"",[38,129,131],{"className":130},[71,82],"; if `python3` is on your PATH",[85,133],{},[38,135,25],{"className":136},[71,72],[38,138,140],{"className":139},[71,126],"\"python\"",[38,142,144],{"className":143},[71,82],"; if `python` is on your PATH",[48,146,147],{},"If you use virtualenv or Conda, simply specify the path of the Python executable in the environment you wish to use:",[63,149,150],{},[66,151,152,73,155],{},[38,153,25],{"className":154},[71,72],[38,156,158],{"className":157},[71,126],"\"/path/to/myenv/bin/python\"",[48,160,161],{},"The path may be relative or absolute. So, if you have a virtual environment in the same folder as your model, you can do:",[63,163,164],{},[66,165,166,73,169],{},[38,167,25],{"className":168},[71,72],[38,170,172],{"className":171},[71,126],"\"myenv/bin/python\"",{"title":174,"searchDepth":175,"depth":176,"links":177},"",5,3,[178],{"id":19,"depth":176,"text":179,"children":180},"\n    py:setup\n  ",[181],{"id":29,"depth":182,"text":183},4,"\n    py:setup python-executable\n  ","Documentation for the setup primitive.","md",{"source":187,"metadataOutputPath":188,"projectConfig":189,"language":197,"inheritFrom":205,"output":204,"version":190,"layout":206,"dictionaryDisplayName":207,"dictionaryHomeDirectory":208,"indexFileURI":209,"currentItemId":14,"currentItemLabel":25,"primRoot":210,"icon":211,"extensionName":212,"assetsRoot":192},"../../external/extensions/py/py/setup.md","content/py/setup.metadata.yaml",{"version":190,"projectRoot":191,"scanRoot":192,"outputRoot":193,"defaults":194,"engine":200,"partials":201,"dedupeIdenticalDiskWrites":204},"7.0.4",".","/home/runner/work/Helio/Helio/external/extensions/py","content",{"inheritFrom":195,"language":197,"output":198,"extension":185,"title":199,"version":190},[196],0,"en",false,"NetLogo User Manual","mustache",{"directoryPaths":202,"extensions":203},[191],[200,185],true,[196],"catalog","Python Extension Dictionary","/py.html","/_index/extensions/py.txt","py","logos:python",{"shortName":210,"fullName":213},"Python","/py/setup",{"title":5,"description":184},"py/setup","GHBw-xsh8CFPLb6zbCGbNB4GHKrhaVnwDnQnj6QyBQk",[219,224],{"title":220,"path":221,"stem":222,"description":223,"children":-1},"Python Extension Dictionary: set","/py/set","py/set","Documentation for the set primitive.",{"title":225,"path":226,"stem":227,"description":228,"children":-1},"System Requirements","/requirements","requirements","System requirements and installation guidelines for running NetLogo on different operating systems and hardware configurations.",1777657781235]