
0
python extensions?
Has anyone had any luck installing python extensions?
I don't really get how the python ecosystem works.
I have found a few pythons scripts on the internet that I would like to attempt to implement but they often involve importing numpy or spicy or scikit. I can't seem to figure out the work flow for adding something like numpy to a MicroMine script.
I have found ample downloads but it looks like they come as part of other python packages. If I install one will it be available for use in MicroMine.
Customer support service by UserEcho
I have had success installing extensions. They need to be the same version of Python that Micromine installs and the same bit type (32 vs 64). I had to do a bit of uninstalling to clear out the wrong bit version I'd tried before I found the right one for me.
You can check your version with this script
print (sys.version)
Thanks that is helpful, but how does the process work?
I was doing some reading about PIP. Would you run the PIP through MicroMine or another version of python outside of MicroMine. If you run PIP outside of MicroMine can you still call things like numpy from scripts within MicroMine?
If you click on Help -> Download Extras it will take you to a page that has the Python scripting packages with links to the relevant add ons and direction to the complete compatible packages. This is what I used and have not had any issues (mind you my python is rudimentary to neigh non-existent at this stage!).
Micromine 2016 has a new and improved Python included; Python 3.5. We have also improved our Micromine python loader so we are now compatible with any 3.5.x python installed on your system, rather than the very explicit build install requirements we had with MM2014.
As has already been noted you do need to match the Python install with the Micromine architecture (32 vs 64).
The Help | Download Extras page for Micromine 2016 has updated python installer links.
Some care does need to be taken to download the correct 3rd party python modules to ensure they are 3.5 compatible and also match the 32-bit or 64-bit architecture.
Micromine also already installs the Visual Studio 2015 prerequisites that the python packages require, so one less thing to worry about.
I also would like to add that for Python 3.5 there is an easier way to install Python with the most popular external modules. The following link is to download Anaconda
https://www.continuum.io/downloads
This is a package with Python distribution and a lot of different external modules (numpy, scipy, matplotlib etc), so you will need to use PIP only for non-included modules.
Thanks for updating to Python 3.5. Anaconda makes things much easier (I've lost a lot of time over the last few years trying to get PIP install to work from the command prompt).
Anyway, Geoff, I highly recommend looking at the Pandas module. It is based on Numpy and seems to be designed for the kind of work we often do. Once you have got the Anaconda distribution I recommend playing around with Pandas in the Ipython Notebook to see how it works. There are loads of YouTube videos that demonstrate its power and ease of use.
Welcome. In addition, PIP becomes problematic when you try to install a package that requires Visual Studio prerequisites (Scott has mention above). The way to avoid these problem it to install wheel files (pip install <wheel_path>). These wheels are already compiled so they can be installed easily.
P.S. Anaconda also has some problems you might encounter (I had them with Pandas and Matplotlib). In case you face these problems, use the following link to download wheels: http://www.lfd.uci.edu/~gohlke/pythonlibs/
Just download the one you need and use command "pip install <wheel_name>" (without quotes).
While working in command line ensure you are working in the directory where the wheel file is stored, then you won't get any issues with package installation.