-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup.py compile on Win 7 without Visual Studio installed. #42
Comments
My system is WIn 10 (x64), Python 2.7 (win32) and Visual Studio 2013. I have successfully generated MuPDF with this VS 2013, from where the *.lib files in the optional-material-repo were taken. Your error message above What is your Python version? I have just communicated with someone using Win 8.1 (x64) / Python 3.4 (win32), who generated MuPDF and then PyMuPDF successfully using Visual Studio. |
Just confirming:
instead of just invoking |
I'm not sure if this is what you wanted me to try but here is the terminal copy and paste: G:\pyfitz>g:\pyfitz\PyMuPDF-optional-material\utility\python++ setup.py install (note: turning in for the night, I'll try again tomorrow.) |
Win 8.1 64 bit. Only Python 3.4 installed in a G:\Python34 directory. No Visual Studio installed. |
Though I don't have a Windows machine, but it seems that you might have to install VS first since the compiler/linker are required. |
Ok, so despite what the directions here say. I apparently have to install VS in order to get PyMuPDF to install on my computer. Sorry for this stupid question but I assume that is only necessary to compile the package. Once it is compiled I will be able to deploy the application with something like Py2exe without the requirement that the client computer have VS installed, correct? |
@gbarnabic - you do need a C / C++ compiler to install PyMuPDF. The error in your generation log (cl.exe missing) says that your Python installation does not know the whereabouts of your C / C++ compiler / linker. You do not need Visual Studio, if you have the MuPDF libraries libmupdf.lib and thirdparty.lib available on your machine, which must be compatible to your Python version. The *.lib files provided in the optional material of PyMuPDF are for Python 2.7, they will not work for Python 3.x - I need to clarify this fact in the installation instructions. I am working on a Python 3.x version for those 2 libs. In your case (Python 3.4), I am afraid you must generate MuPDF yourself using Visual Studio for the time being. |
OK, now I understand. I'm working on a few other things so I'll hold off for a while on installing VS on my Win8 machine. Hopefully by the time I get back to it, you will have gotten a chance to get those 3.4 versions of the .lib files uploaded somewhere. If not I'll have to clear up some space and do the VS install. |
@gbarnabic - I have created *.lib files for Python 3.x. They are contained in directory
|
Wow, you have done a lot of work on this. The bad news is that I am on Windows 8.1. The Win 7 SDK failed to install. I found the 8.1 SDK https://dev.windows.com/en-us/downloads/windows-8-1-sdk but it says it does not come with the compiler anymore. So it appears that I have no choice but to install VS 2013. So... I downloaded the VS 2013 Community version... I have 7 gig left on my C: drive but 1.28 TB on my G: drive. Unfortunately the shitty install that MS provides tells me that it requires "9 GB across all drives." Despite me telling it to install on my G: drive it will not install saying I need to free up more space. It looks like getting this to install is not meant to be for me. |
How unfortunate! |
@gbarnabic - here are some good news that may interest you: |
Success!!! I have no idea of your location on this planet but I do owe you a dinner or something. It worked like a charm. Much thanks for putting in all the work on my specific issue. Hopefully someone else will benefit as well. |
Great - glad to hear that. Should you ever plan to come to this country (more specifically, Isla de Margarita), let's make sure we meet ... |
You never know. I took a quick look at Isla de Margarita and it looks very nice. I'm actually off to Buenos Aires Argentina in a few weeks for a 2 week cruise around Cape Horn and up along the Chile coast. I've never been to Venezuela. Drop me an email with your info. My email is the name I use here @gmail.com. |
@liaicheng You need this type of helpers on Windows, if your C compiler is not the one that your Python installation expects. In that case you always must provide your own information on where to find all the libraries. Unfortunately this is always a mess on Windows ... this was my motivation to prepare PyMuPDF installation binaries for the plagued Windows users :-) Here is the source of python++.bat to compile / generate Python 2.7 32bit extensions. Other Python versions and / or Visual Studio versions of course require changes. To be invoked exactly like
In order to avoid Python setup and Visual Studio making the wrong assumptions, I am currently using this type of script to generate PyMuPDF for several Python versions. The compile and link stepts are exactly what a Hope it helps ... |
I used the binary installation, but it seems that gets CJK front problom |
OK - then this should be a separate new issue. These are just warnings. Are you actually experiencing that text is not reproduced correctly (e.g. in pixmaps or text output)? I have tested text with Chinese charatcers and found no problems. I do get this type of warnings a lot myself ... |
@JorjMcKie Thanks for your respones! :) |
you can check that file:https://ufile.io/9afc8 |
well, would you agree that my above example is sufficient? If not, I can change So, I am sure we will find a solution. Keep in touch. |
thanks, @JorjMcKie ,the example is sufficient! |
@liaicheng I am going to open another issue and talk to you from there. |
I followed the directions:
if you have not installed Visual Studio or if you do not want to generate MuPDF, you must download PyMuPDF Optional Material now and unzip / decompress its content in directory ./PyFitz/PyMuPDF-optional-material. This optional material contains the lib files needed for PyMuPDF generation, and the MuPDF header files. Update setup.py, parameter include_dirs, to point to these header files.
I don't have Python 2.7 installed on the computer either if that has anything to do with it.
Here is what I get:
G:\pyfitz>python setup.py install
running install
running build
running build_py
running build_ext
building 'fitz._fitz' extension
error: Unable to find vcvarsall.bat
I do end up with g:\pyfitz\build_init_.py, fitz.py, utils.py but no _fitz.pyd
The text was updated successfully, but these errors were encountered: