Environment: python 3.7, cmake 3.19.0, Visual Studio Community 2019, Qt5.9.9(including MinGW)
I downloaded the package in http://mantaflow.com/download.html and its github, I was trying to install it but failed in run the manta.exe.
Here is my installation step:(after downloading the environment, I refered in https://blog.csdn.net/u012685679/article/details/84436953)
1.Unzip the mantaflow-master, mkdir the build
2.Open Cmake, choose the Browse Source and the Browse Build
3.Click the "Configue"
4.In the table, it listed something, add the Qt-something, click the GUI and OPENMP (I don't know why, just refer to that webside..)
here is the screenshot
5.Click the "Generate"
6.Open the "..\mantaflow-master\build\MantaFlow.sln" in the Visual Studio.(Administrator)
7.Set "menta"({ALL_BUILD, manta, prep, ZERO_CHECK}) "Debug" to "Release", set as startup project
8.copy the python37.dll to python37_d.dll(They are all in one folder, similarly hereinafter), copy the python37.lib to python37_d.lib in ..\lib, delete " # pragma comment(lib,"python37_d.lib") ", and "# define Py_DEBUG" in pyconfig.h
9.Debug in Visual Studio.
The process didn't notice something after it generate manta.exe. It noticed the error about 0xc000007b which meant that it didn't run manta.exe. I don't know how to fix the problem. Thanks for your advice.
I'm sorry about my poor English, if you can't understand my expression or you need more detail in my computer environment or something, please send to me.
The manual states that "Manta does not link or run on windows" but can be compiled to the library level. Have you manged running Manta on Windows?
Manual: https://github.com/Illumina/manta/blob/master/docs/developerGuide/README.md#windows-development-support
Related
I am trying to build the package, html5-parser for my Windows 10 python environment. I have read the instructions found here: https://html5-parser.readthedocs.io/en/latest/
but find them unclear.
The script that is used to run that package, while readily available from the Github repro doesn't work if run from the directory where it resides in that project. The reference above assumes the script will be run from a windows continuous integration server. Of course, my python development environment is not that.
I don't know how to proceed from here and I'm looking for some step by step instructions on how to build this package.
This is not final solution / answer, but I want to post some steps which can help to achieve final solution.
First, You need to install MSCV build tools, follow this tutorial and make sure You have all the packages.
Then clone html5-parse library:
https://github.com/kovidgoyal/html5-parser.git
Move win-ci.py from subfolder .github\workflows to the root folder of the repo (where setup.py is).
Edit win-ci.py and comment out lines:
#env = query_vcvarsall()
#os.environ.update(env)
From functions install_deps() and build().
Now open command line in the repo dictionary and run:
python win-ci.py install
This should install all dependencies.
After this, running python win-ci.py should execute build() function and finish installing of the library.
Unfortunately I had issues to make paths working properly.
After installing build tools I didn't have nmake.exe in path so I had to add it manually:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64
Then in build() step I've got stuck by missing sttdef.h.
I have library installed in C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt but still couldn't make it work.
I try to compile PJSUA2 for Python. I could manage to compile the source with Visual Studio 2015 Community edition.
My question is, how can I install the Python module now?
The guide suggests to use make and make install. I tried to install also minwg, but it is not working as the project was compiled with VS.
I have also tried to compile with minwg, but I never could succeed due to undefined requirements. Also official PJSUA guide recommend to use VS for Windows.
Following settings have been applied to build from source:
Swig location has been added to path
JAVA_home system variable has been added
Java location has been added to path
Empty pjlib/include/pj/config_site.h has been created
Opened source in VS 2015 Community (all suggested VS package and module has been installed)
Set following project to do not compile:
pjsua_cli_uwp_comp
pjsua_cli_wp8
pjsua_cli_wp8_comp
Set swig_java_pjsua2 to build.
Add following folders to swig_java_pjsua2 VC++ include directories
c:\Program Files\Java\jdk-11.0.2\include
c:\Program Files\Java\jdk-11.0.2\include\win32
Build solution
I could make a workaround to compile pjsua2 for Python 3.7. If you have a better solution or just suggestion to this workaround, let me know
Preconditions:
List item
Download and extract swig (swigwin 4.0.0)
Download and install JDK
Download and install Python (Python 3.7.3 x64) and set at custom installation:
tick "Add Python to environment variables"
tick "Precompile standard library"
tick "Download debugging symbols"
tick "Download debug binaries (requires VS 2015 or later)"
set custom path if you want
add swigwin location to system path
add Python location to system path
add JAVA_HOME system variable
add %JAVA_HOME%\bin to system path
Install Visual Studio 2015 Community edition
Steps:
Download and extract pjsip 2.8
Create empty config_site.h under pjlib/inlclude/pj/ folder
Open pjproject-vs14.sln in VS
There will be an unsupported warning window, press OK
At the "Install Missing Features" windows, press install
VS installer will be started, and VS has to be closed to complete installation.
I have also added "Windows 10 SDK (10.0.10586)" to the installation.
I have also enabled developer mode on my Windows 10, but this could be optional
Open project again in VS
Set project to Release and x64 on the top dropdown
Right click on the solution, and go to Configuration Properties> Configuration
Remove all uwp and wp8 related projects from selection, like pjsua_cli_uwp_comp, pjsua_cli_wp8_comp
press OK, and build solution
I have had 34 succeeded and 0 failed solution after build.
Add following lines to pjsua2.i in pjsip-apps/src/swig folder
%inline %{
pj_ssize_t new_pj_ssize_t(int s) {
return (pj_ssize_t) s;
}
%}
this extra inline swig function provides workaround for create recorder issue
Open a command line (powershell did not work for this)
go to pjsip-apps/src/swig/python
Execute following command:
swig -I../../../../pjlib/include -I../../../../pjlib-util/include -I../../../../pjmedia/include -I../../../../pjsip/include -I../../../../pjnath/include -py3 -c++ -python -threads ../pjsua2.i
Add new "Empty Project" (Visual C++) to solution with swig_python_pjsua2 name
Add libpjproject and pjsua2_lib as reference to this new project
Right click on the Header Files>Add>Existing Item...
Add pjsip-apps\src\swig\pjsua2_wrapp.h
Add a "new filter" to the project with name "Generated Code"
Right click on "Generated code" and add new existing item.
Add pjsip-apps\src\swig\pjsua2_wrapp.cxx
Right click on the project and Linker>Input
Add "Ws2_32.Lib" to "Additional Dependencies"
Go to "VC++ Directories"
Add following folder to include path(I have used full path!):
c:\python37\include
pjnath\include
pjsip\include
pjmedia\include
pjlib-util\include
pjlib\include
Add following folder to Library Directories:
C:\Python36\libs
Set at General:
Target Name: _$(ProjectName)
Target Extension: .pyd
Configuration Type: Dynamic Library (.dll)
Go to properties of the solution, and select swig_python_pjsua2 to build
Right click on swig_python_pjsua2 and build
Build should complete successfully
You will need to file to use pjsua2 library in python.
pjsua.py located under pjsip-apps/src/swig/python
x64/Release/_swig_python_pjsua2.pyd (rename this to _pjsua2.pyd)
To test, copy those to file into a folder, start python from same folder and type:
import pjsua2
Thank You very much Krisz for this awesome work!
I just got it working for Python 2.7 / 32bit and some things are slightly different, so I will add them here:
Environment:
Windows 10
SWIG 4.0.1
PJSIP 2.9
Python 2.7.14 (32bit)
Visual Studio Express 2015 (V 14.0.25431.01 Update 3)
Whaddado:
Important: Check if your Python-interpreter is really x64 or win32 like the following:
start a python session and enter:
import platform
platform.architecture()
If you have 32bit, consider this in your choice for target platform in VS.
when you add this %inline%-Snippet to pjsip-apps/src/swig/pjsua2.i, add it at the end of the file!
when starting the swig-command, omit the "-py3"-parameter, if you use Python 2.x
there is a little typo in Krisz' description, at "pjsua.py located under pjsip-apps/src/swig/python" -> of course pjsua2.py is meant. Do not use the pjsua.py.
finally copy _pjsua2.lib and pjsua2.py into \Lib\site-packages\ and the _pjsua2.pyd into \DLLs\ to make them available everywhere.
I'm actually using Python for an audio steganography project but I have some troubles.
I searched this error code on the forum, but I found things about SQL installations and not Python.
I'm trying to re-install Python 3.6.5 after an uninstall, because of a bug with pip.
I installed Python 2.7, Python 3.6.5, Python with VS 2017, before uninstall it because it wasn't working.
However, when I'm runing the installer as an administrator, hit "customize installation", tick everything excpet "balblalblabal (this requires VS 2015 or later)", and click on "install", it tells me that :
.
I realy need Python to work and I'm now stuck ...
If anybody here could help me, it would be nice !
Thanks all,
maleik.
PS : I have the log for you :*
The log link
I found this in the log file which you have attached. Try cleaning the registry with CC cleaner and give it a try. If it still doesn't work, try installing python with web installer Python Web Installed 3.6.5.
[3DA0:2968][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to install MSI package.
[3DA0:2968][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to execute MSI package.
[2610:03A4][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to configure per-machine MSI package.
[2610:03A4][2018-12-05T20:46:18]i319: Applied execute package: core_AllUsers, result: 0x80070643, restart: None
[2610:03A4][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to execute MSI package
I installed python from Microsoft store after facing this problem and it magically got installed without any error as it may have directly been installed. I don't know but try if it eorks for you too.
You need to run the installation as a local administrator.
I had the same problem installing Python version 3.9 for the first time on my Windows 10, as this same problem happens to many users trying to install Python, the best solution I accidentally, just like #MANAN AGGARWAL discovered trying to check if I already had a version of Python installed on my computer by the DOS Command Prompt, was:
Open the DOS Command Prompt (cmd) and dictate "python": if a screen shows you a version, it's clearly not the first time you've installed Python, so if you want to upgrade you should try: https: / /www.delftstack.com/en/howto/python/how-to-update-python/ But if you've never installed any version of Python, the solution lies in updating your operating system to the latest version through Windows Update, and open the command prompt and type Python, or go directly to the Microsoft Store and search for Python followed by its latest version. It works without error.
** If by chance it does not automatically install on your PC after downloading, click "install on my devices" and select your computer name.
Why can't I install Python directly from the website file? Please note that when trying to install any software/applications from outside Microsoft's trusted locations, there are high chances of user settings interfering with the installation. When coming, for example, from the Microsoft Store, a chance of success is much greater, even without having problems related to User Permission Settings.
Another important thing to point out here is that installing a lot of software from outside Microsoft's trusted platforms can cause you to change some user permissions which can have positive effects with some software and negative effects with others, even with security your own system if you don't know what you're doing.
it's simple , Try Lower Version Like 'Python 3.6' but Download web install.
install it , then install last python version.
your python will update.
I've faced same/similar problem with installing Python 3.9.12 in a clean Windows 8.1 64-bit (VirtualBoxed test environment).
I thought the issue could have been fixed in a newer version of Python, but the freshest 3.10.10 fails with same issue.
The original log isn't available any longer, but luckily it is quoted in another answer, and the following line reveals the real problem:
Applied execute package: core_AllUsers, result: 0x80070643, restart: None
My log looks the same, and if you scroll the log up, you'll discover that core_AllUsers is a UCRT MSI-installer, which is downloaded from Python site (for 3.10.10 64-bit the link may look like https://www.python.org/ftp/python/3.10.10/amd64/ucrt.msi).
If you download it manually (Python installer is smart enough to do a cleanup even if it fails, so you won't find this MSI in a local cache) and run, it will probably crash. And if it is your case, I have a simple solution - just install update KB2999226 (Update for Universal C Runtime) for your OS, which you can download from Microsoft.
I also faced the similar issue. What the trick worked for me is I installed it for the individual user (as earlier installation was for the all users).
So earlier if one has installed it for the all users then install it for the specific user and vice versa.
I know this is not the resolution of the error faced. However, this approach will install Python which is the main motive to achieve.
I encountered the same issue after installing a fresh Windows 8.1 on my PC.
I solved that by using the Python v3.9 web installation file which you can find here.
However, you can choose any other version that has a web installation file
Note: You need internet connection to use this method.
Like many before me I don´t succeed in installing a few Python packages (mysql, pycld2, etc.) on Windows. I have a Windows 8 machine, 64-bit, and Python 3.4. At first I got the well-known error "can´t find vcvarsall.bat - install VS C++ 10.0". This I tried to solve by installing MinGW and use that as compiler. This did not work. Then finally I found an installer for this VS C++ 10.0 here http://microsoft-visual-cpp-express.soft32.com/free-download/. This doesn´t work too good either. Now it seems to find the vcvarsall file but instead gives me a couple of new errors
nclude -IC:\Python34\include /Tc_mysql.c /Fobuild\temp.win32-3.4\Release\_mysql.
obj /Zl_mysql.c_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h':
No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2
And:
pycldmodule.cc
bindings\pycldmodule.cc(16) : fatal error C1083: Cannot open include file: '
strings.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2
So now it doesn´t find strings.h and config-win.h and I´m too new to these sorts of problems to know what to look for. Anyone knows what I should do?
The thing is that I could just not use Windows and go over to Ubuntu as, for what I´ve understood, works painlessly with python. However, I have to use the win32com package which doesn´t exist on Ubuntu (have I understood that right?).
If I can´t solve these installing hassles on Windows, would a solution be to use a Windows virtual machine for the win32com part and do the rest on a host Ubuntu (or the other way around)? Would there be anyway to communicate between the two in that case? I.e. sending strings or arrays of data.
I have faced the exact same issues for Python 2.7 on 64 bit Windows trying to install pycld2.
Tried many methods like installing VS express 2008, MingW, etc and it just doesnt work.
What saved me is this link:
https://github.com/aboSamoor/polyglot/issues/11
The proposed solution is to download the binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/ and pip install .whl
The cpXX denotes the version of python. So in my case, I used cp27.
Hope it helps
I would recommend installing Ubuntu (as a Ubuntu user), you can dual-boot. However, that isn't an answer.
MySQLClient (the fork for Python3) is available a precompiled binary from here:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient
Try to find precompiled binaries for simplicity sake. As far as troubleshooting the install goes, I've tried the recommend VC Studio 9.0 on fresh installs and it cannot find stdint.h (which, like yours, suggests it's more than broken).
You could try http://www.activestate.com/activepython/downloads for Windows. I t includes compiled binaries, avoiding the need for a C complier.
I grew frustrated with trying to get python and other packages to compile/play nicely on Windows as well. Switching over to Ubuntu was a breath of fresh air, for sure.
The win32com package is made specifically for Windows hosts, so that could not longer be used, but there are other ways to achieve the same thing in Ubuntu.
Are you trying to target Windows specifically? What are you using win32com for?
Looks like you're missing MySQL dev package. Another StackOverflow question has the details. But if I were you, I'd go the route Alexander Huszagh recommended and get my precompiled binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysqlclient
It is PythonQt : pythonqt.sourceforge.net. I am using PythonQt-1.1 . Qt version 4.6.2 and Python 2.6.4.10 . Visual studio 2008
From instruction:
cd PythonQtRoot
vcvars32
qmake
nmake
after I typed qmake, it generated makefile, then I entered nmake but it said "makefile(22) :fatal error U1000: syntax error: ')' missing in macro invocation Stop." What did I do wrong here?
Thanks in advance....
I remember running into similar problems when building other packages with recent releases of Qt on Win32. I'm running under cygwin, by the way. After a fair amount of debugging, I discovered that 'qmake' was using the wrong 'mkspec'. One thing that helped this situation was to force the use of the correct mkspec, like so:
export QMAKESPEC=win32-msvc2008
or
export QMAKESPEC=win32-msvc
To find the list of all valid mkspecs, I looked in the directory:
c:\Qt\4.6.0\mkspecs
or
c:\Qt\2010.01\qt\mkspecs
For one particular package, I had some conflicts with other tools installed on my system and had to edit the actual mkspec file to point to the correct tool using an absolute path, but it sounds like that is not your problem here. It sounds like yours is generating a gmake-compatible Makefile instead of an nmake-compatible Makefile, so this fix should work.
-- Glenn
My suggestion is to include the PythonQt project as part of your very same project with CMake.
You then simply have to build it as part of your project statically (remove the SHARED from the add_library in the base CMakeLists.txt, by remembering that if you want it to be so, you have to remove the project(PythonQt) from its base CMakeLists.txt and then adding to your proper CMakeLists.txt base file the following:
if( PYTHON_QT_SUPPORT )
message(STATUS ":::: Including support for PythonQT Shell ::::")
# Include Python directories
find_package(PythonLibs REQUIRED)
include_directories("${PYTHON_INCLUDE_DIR}")
# Include PythonQt
include_directories(YOURPATHTOPYTHONQT/pythonqt/src)
add_subdirectory(YOURPATHTOPYTHONQT/pythonqt)
endif(PYTHON_QT_SUPPORT)
Have you made sure to update the Python/Qt versions in the build folder, and include everything you need in your environment?
In build\python.prf:
update python version
Use a Visual Studio Command Prompt and skip the vcvars32.
set your environment paths:
set PATH=E:\toolkits\Trolltech\Qt-4.8.6\Win_x64_6.1_v12_debug\lib;%PATH%
set PATH=E:\toolkits\Trolltech\Qt-4.8.6\Win_x64_6.1_v12_debug\bin;%PATH%
set PYTHON_PATH=E:\toolkits\Python\2.7.9\Win_x64_6.1_v12
set PYTHON_LIB=E:\toolkits\Python\2.7.9\Win_x64_6.1_v12\libs
In those paths, you should have available:
all qt libraries (QtCore4.dll, etc.)
all qt executables (uic, moc, etc)
python26.dll, python.exe
I've also had to update the other .prf files to make sure the debug extensions are properly done when i'm binding on debug dlls.