Hi I have been reading these three threads from three years ago, trying to figure out if there is easier way to pip install python modules through cmd
I am wondering have there been any update since?
Is there a easier way now install packages in IronPython 2.7.8?
If I pip install compatable 2.7 IronPython package through command line, will it just work in Rhino and gh, or do I still need to set something up somewhere else?
I tried many things today. Including trying to replace the original IronPython directory in Rhino with a full install. However it doesn’t work and I still have to go back to the old method.
Here is my whole solution, just in case if anyone is having trouble understanding other posts:
Find IronPython version in either rhino or gh python editor
Add newly installed IronPython to Environment Variable Path
windows search -> edit the system environment variables -> environment variables -> user variables for xxx -> double click on “Path” -> New -> type “C:\Program Files\IronPython 2.7” or whatever path you installed
Install PIP and your package
windows search “cmd” -> right click run as admin
to install pip or make sure pip is installed
ipy -X:Frames -m ensurepip
to install package (use package “xlrd” as an example here)
Add the module directory to Rhino search scope
I did a search in “C:\Program Files\IronPython 2.7”
and seems that pip put the installed “xlrd” package in the directory “C:\Program Files\IronPython 2.7\Lib\site-packages”
In Rhino type in the command “EditPythonScript”. In this Python editor go Tools -> Options -> Files. Add directory “C:\Program Files\IronPython 2.7\Lib\site-packages” and “C:\Program Files\IronPython 2.7\Lib”