0

I'm new to Manpy. I tried to follow the instructions in the documentation, and I got some errors when installing.

  1. Download dream-master into a folder in my computer.
  2. Install Microsoft Visual C++ Build Tools.
  3. Run the setup script that is in the root folder (python setup.py install).

Errors:

File "c:\users\sito\appdata\local\programs\python\python37-32\lib\site-packages\dream-0.0.1-py3.7.egg\dream\simulation\applications\DemandPlanning\AllocManagement_Hybrid.py", line 38 print G.priorityList ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(G.priorityList)?
File "c:\users\sito\appdata\local\programs\python\python37-32\lib\site-packages\dream-0.0.1-py3.7.egg\dream\simulation\applications\DemandPlanning\AllocationForecast_IP.py", line 150 print 'lp results', item['sp'], allQty, LpStatus[prob.status], sum(MA_var[ma].varValue* G.BatchSize[ma][week] for ma in MAlist) ^ SyntaxError: invalid syntax
File "c:\users\sito\appdata\local\programs\python\python37-32\lib\site-packages\dream-0.0.1-py3.7.egg\dream\simulation\applications\DemandPlanning\AllocationRoutine_ForecastGA.py", line 51 print 'item', item['orderID'] ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print('item', item['orderID'])?
File "c:\users\sito\appdata\local\programs\python\python37-32\lib\site-packages\dream-0.0.1-py3.7.egg\dream\simulation\applications\DemandPlanning\Allocation_ACO.py", line 138 print 'Termination Criterion Reached' ... error: Setup script exited with error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https:⁄/visualstudio.microsoft.com/downloads/

karel
  • 5,489
  • 46
  • 45
  • 50
tg.si
  • 1
  • "Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/" -- do you have Microsoft Visual C++ Build Tools 14 installed? Microsoft Visual C++ Redistributable for Visual Studio 2017 might do. – Bagus Tesa Mar 25 '19 at 01:14
  • Thank you very much. I have had c++ build tools 14 installed. And now the errors are "installed_mysql.c(42): fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory error: Setup script exited with error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2 – tg.si Mar 25 '19 at 01:43
  • hmm, its different issue already, you can try [this](https://stackoverflow.com/questions/26866147/mysql-python-install-error-cannot-open-include-file-config-win-h) and [this](https://stackoverflow.com/questions/1972259/cannot-open-include-file-config-win-h-no-such-file-or-directory-while-inst). perhaps i should get a python myself to see this.. – Bagus Tesa Mar 25 '19 at 02:21
  • Thanks@BagusTesa. I find errors like print xxxx. I guess the lib is based on Python 2.x. I will try. – tg.si Mar 25 '19 at 03:36
  • It works with Python 2.7. Just to install c++9. error: Setup script exited with error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27. Thanks @BagusTesa – tg.si Mar 25 '19 at 04:03
  • wah, never thought that the python version mismatched. my bad. i never thought that was the reason. glad you solved it already. – Bagus Tesa Mar 25 '19 at 06:27
  • I installed C++ 9.0 compiler. Then I got Running MySQL-python-1.2.5\setup.py -q bdist_egg --dist-dir c:\users\stglj\appdata\local\temp\easy_install-jpq7ak\MySQL-python-1.2.5\egg-dist-tmp-xng2z0 _mysql.c _mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory error: Setup script exited with error: command 'C:\\Users\\stglj\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2 – tg.si Mar 25 '19 at 14:38
  • I guess the connector was not installed properly, which causes "config-win.h" missing. I have mysql 5.5 on my computer. Not sure how to fix it. I am new to Python ecology, SimPy and ManPy. I have been working with Java for a long time. The shift seems harder than I expected. Thanks. – tg.si Mar 25 '19 at 14:42

0 Answers0