This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
numberjack [2015/10/29 22:21] efernan |
numberjack [2016/11/04 18:42] aytonb [Installing Numberjack from Source] |
||
---|---|---|---|
Line 26: | Line 26: | ||
+ | ===== Installing Numberjack from Source ====== | ||
+ | |||
+ | For some students, Numberjack is not installing SCIP correctly when running ''sudo update_intro_to_autonomy''. To verify that this is your problem, run the following code in a Jupyter notebook and make sure you do not see SCIP in the list: | ||
+ | |||
+ | <code> | ||
+ | import Numberjack | ||
+ | Numberjack.solvers.available_solvers() | ||
+ | </code> | ||
+ | |||
+ | If you are experiencing this issue, we can fix it by installing Numberjack from source. | ||
+ | |||
+ | 1. Go to https://github.com/eomahony/Numberjack, click 'Clone or download' and then 'Download ZIP'. Save the file. | ||
+ | |||
+ | 2. Go to wherever you saved the .zip file and extract the contents. | ||
+ | |||
+ | 3. Open a terminal and navigate to the folder Numberjack-master you just extracted. For example, ''cd ./Downloads/Numberjack-master/''. | ||
+ | |||
+ | 4. Run the following commands: | ||
+ | |||
+ | <code> | ||
+ | source /opt/16.410-psets/bin/activate | ||
+ | export ZIBPATH='/usr/local/src/scipoptsuite-3.2.0' | ||
+ | sudo chown -R student:student /usr/local/src/scipoptsuite-3.2.0 | ||
+ | python setup.py build | ||
+ | </code> | ||
+ | |||
+ | This may take a while. | ||
+ | |||
+ | 5. Verify that when this is finished, you see the message ''Successfully built solver interfaces for Mistral, Mistral2, MipWrapper, SatWrapper, MiniSat, Walksat, SCIP'' (note SCIP is installed). | ||
+ | |||
+ | 6. Verify that Python can see SCIP in this installation of Numberjack with the following commands in the terminal: | ||
+ | |||
+ | <code> | ||
+ | ipython | ||
+ | import Numberjack | ||
+ | Numberjack.solvers.available_solvers() | ||
+ | </code> | ||
+ | |||
+ | 7. Exit ipython (hit CTRL-D twice). | ||
+ | |||
+ | 8. Run the following commands (still from the Numberjack-master folder): | ||
+ | |||
+ | <code> | ||
+ | sudo rm -rf /opt/16.410-psets/local/lib/python2.7/site-packages/Numberjack | ||
+ | sudo cp -r ./Numberjack /opt/16.410-psets/local/lib/python2.7/site-packages/Numberjack | ||
+ | </code> | ||
+ | |||
+ | 9. Verify that SCIP is now present in the list of solvers when Numberjack is run from the jupyter notebook. You will need to restart the notebook kernel. |