Error in compilation (python.h file not included)

For posts concerning the documentation, errors, ommissions, general comments, etc.

Moderators: silvia, selimgunay, Moderators

Post Reply
KyriakosTryphonos
Posts: 10
Joined: Mon Mar 28, 2016 1:48 pm
Location: University of Patras

Error in compilation (python.h file not included)

Post by KyriakosTryphonos »

Hello all,

I am trying to compile Opensees.sln but I am getting some errors because the header file python.h is not included in the directory. I found where the file python.h is located and I included the directory in OpenSeesPy project in order to compile the solution again. After that, I was still getting some errors, so I uninstalled Python from my Pc. I tried to compile again and I am still getting the same following error:

1>------ Build started: Project: OpenSees, Configuration: Debug x64 ------
2>------ Build started: Project: OpenSeesTk, Configuration: Debug x64 ------
3>------ Build started: Project: OpenSeesPy, Configuration: Debug x64 ------
3>PythonModule.cpp
3>c:\users\kyriakos\documents\sxoli\phd\opensees\opensees_developer\src\interpreter\pythonmodule.h(49): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
3>PythonWrapper.cpp
3>c:\users\kyriakos\documents\sxoli\phd\opensees\opensees_developer\src\interpreter\pythonwrapper.h(46): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory
3>Generating Code...
3>Done building project "OpenSeesPy.vcxproj" -- FAILED.
2>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
2>LINK : fatal error LNK1181: cannot open input file 'tcl86t.lib'
2>Done building project "OpenSeesTk.vcxproj" -- FAILED.
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/FORCE' specification
1>LINK : fatal error LNK1181: cannot open input file 'tcl86t.lib'
1>Done building project "OpenSees.vcxproj" -- FAILED.
========== Build: 0 succeeded, 3 failed, 24 up-to-date, 0 skipped ==========


Is there a way to fix this issue?

Thanks
Kyriakos
CMiculas
Posts: 26
Joined: Wed Oct 25, 2017 6:23 am
Location: University of Coimbra

Re: Error in compilation (python.h file not included)

Post by CMiculas »

Which python version are you using?
KyriakosTryphonos
Posts: 10
Joined: Mon Mar 28, 2016 1:48 pm
Location: University of Patras

Re: Error in compilation (python.h file not included)

Post by KyriakosTryphonos »

I am using Anaconda Python 3.6
KyriakosTryphonos
Posts: 10
Joined: Mon Mar 28, 2016 1:48 pm
Location: University of Patras

Re: Error in compilation (python.h file not included)

Post by KyriakosTryphonos »

Now installed Python 3.6.1 in the location C:\Program Files\Python36 which is the one that VS2017 is searching for. I am still getting one more Linker fatal error:
2>LINK : fatal error LNK1181: cannot open input file 'tcl86t.lib'

tcl86t.lib is located in C:\Program Files\Python36\tcl. I changed the settings in OpenSeesPy project(Additional Include Directories and Additional Include Directories in Linker) to include that library and I am getting more errors now.

Any ideas why this is not working?
Post Reply