How to install pulp after installing Anaconda?

13191
7
Jump to solution
08-29-2018 09:41 PM
nataliemartinkus1
Occasional Contributor

I installed pulp this summer to write optimization routines in Python.  Today I installed Anaconda as the main Python 2.7 source so I can use numpy and pandas in my optimization routines, and now when I import pulp in a python script it says "No module named pulp".   I would like to believe there is an easy fix to this like reinstalling pulp under Anaconda, but I honestly struggle when it comes to running anything from the cmd prompt in Windows and I dont know what else to do. 

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Emeritus

Installing Packages — Python Packaging User Guide provides some instruction but I no longer have arcmap installed so I can't provide instruction to your python command line link in the Start menu for the arcmap link

View solution in original post

7 Replies
DanPatterson_Retired
MVP Emeritus

have you switched into your anaconda environment?

and if you have multiple versions of python kicking around you are going to have issues.

if you are working with recent versions of arcmap or ArcGIS pro, then you already have numpy, pandas and other stuff installed.  If you wanted install pulp for 10.6.1 for instance, you didn't need to do an anaconda install to get it (pip install I presume).

Maybe you might want describe what you are using and what you have installed. 

0 Kudos
nataliemartinkus1
Occasional Contributor

Hi Dan,

 I am using ArcMap 10.3.1.  I did not uninstall Python 2.7 after installing anaconda.  I use PyScripter to write my scripts. In the next year I plan on learning how to write code for machine learning, so I like that anaconda offers a bunch of programs that are geared toward that.  

thanks,

natalie 

0 Kudos
DanPatterson_Retired
MVP Emeritus

10.3 has its own distribution of python and so does anaconda's distribution.  Pyscripter probably doesn't know about it.

You might want to do a pip install into the site packages for 10.3

PuLP · PyPI assuming that is the one.

I wouldn't bother with anaconda for 2.7 since you will want python 3 for machine learning.  2.7's end of support is in a year or 2 and python is already in version 3.7

When you switch to ArcGIS Pro, you will be working with python 3 anyway

nataliemartinkus1
Occasional Contributor

Thanks Dan for your comments as always.  I forgot to mention that I had originally installed Anaconda (pandas) to read a large csv file into python since it is done quite simply in two lines of code, but I am willing to uninstall Anaconda for now and try to get pulp back, since my optimization routine wont run without it.  

I have pip installed on my machine, but this is where I get lost... how do I use pip to install pulp? I believe it has to do with the command prompt?

0 Kudos
DanPatterson_Retired
MVP Emeritus

Installing Packages — Python Packaging User Guide provides some instruction but I no longer have arcmap installed so I can't provide instruction to your python command line link in the Start menu for the arcmap link

nataliemartinkus1
Occasional Contributor

Thanks Dan for your help.  I uninstalled Anaconda and reinstalled Python and Pulp.  I appreciate your input about python 3 and ArcPro, and the link to installing packages.  I will hopefully migrate to that this fall.

0 Kudos
DanPatterson_Retired
MVP Emeritus

Good luck Natalie... I have lots of python related stuff on my blog and I update

/blogs/dan_patterson/2016/05/09/the-links 

regularly when anything new appears.

0 Kudos