#need wine, python, zbar dlls, zbar zip, poppler #need wine for windows test #64 bit and 32 bit available #700megabytes or more sudo apt install wine #download python 2.7 msi since no #package manager exists for wine wget https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi #need to go into graphical interface #since msi is graphical and need to click [next] at command prompt type wine start python-2.7.15.msi #installs in C:\Python27\ #might get error 002f:err:mscoree:LoadLibraryShim error # reading registry key for install root #if in x or tty can run winconsole #to bring up another console that #uses curses backend wineconsole #exit wineconsole by typing exit #view files dir #for just the names dir /B #change to drive c use backslash windows cd G:\home\username\.wine\drive_c\Python27 cd G:\home\username\.wine\drive_c\users\username\My Documents #can use move and copy in wineconsole #need to install PIL example pip install pillow #need to install pdf2image pip install pdf2image #says illegal enviroment variable name #----------zbar------------ #need to install zbar, install windows exe #located on sourceforge Downloaded link: https://svwh.dl.sourceforge.net/project/zbar/zbar/0.10/zbar-0.10-set up.exe #if type wine zbar-0.10-setup.exe #might get an error #Application tried to create a window, but no driver could be loaded. #Make sure that your X server is running and that $DISPLAY is set correctly. #try again #make sure you have no other instance or wine or wineconsole running #on zbar click checkbox for developer options pip install zbar --log errorzbar.log #says illegal enviroment variable easy_install zbar #says Microsoft Visuall C++ Compiler 9.0 is required, # since need to compile from source #other option is finding a wheel or .whl #get compiler it from http://www.microsoft.com/en-us/download/details.aspx?id=44266 #now says .net frame work not set #error: Setup script exited with error: [Error 3] Path not found: 'C:\\windows\\M #icrosoft.NET\\Framework\\*.*' #someone said try adding env.update(extra_environ env.pop('') #I added the line env.pop('') to ~/.wine/drive_c/Python27/Lib/site-packages/pip/_internal/utils/misc.py #doesnt work #other option download zbar-0.10.zip windows file, extract and #install using setup.py python setup.py install #complains compiler not present #cant find vcvarsall.bat #it is there see drive_c/Program Files x86/Common Files/Microsoft/Visual C++ for Python / 9.0 #other options include installing the wheel whl file #pip install zbar-0.10-cp27-none-win_amd64.whl #or compile using mingw fre c compiler #go to drive_c/Program Files x86/Common Files/Microsoft/Visual C++ for Python/9.0/VC/bin set PATH=%PATH%;c:\Program Files (x86)\Common Files\Microsoft\Visual C++ for Python\9.0\VC\bin #may need for do a cd Visual *asterisk if path too long. run the batch file #in wineconsole SET DISTUTILS_USE_SDK=1 SET MSSdk=1 vcvarsall.bat easy_install zbar #failed status 2 #https://bugs.python.org/issue2943 #install .net framework using winetricks didnt work https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download #install alternate compiler mingw #mingw32-base and mingw32-gcc-g++ apply changes notepad [build] compiler=mingw32 [build_ext] compiler=mingw32 #save in c:\Python2.7\Lib\distutils\distutils.cfg #failed with error zbar.h no such file or directory #need to point compiler to find header files in # c:\Program Files (x86)\ZBar\include #pip install --global-option=build_ext --global-option="-Ic:\Program Files (x86)\ZBar\include" zbar #need to set winepath since mingw bin disappears everytime #from bash shell, need to escape \ export WINEPATH="c:\\MinGW\\bin;c:\\Program Files (x86)\\ZBar\\include;c:\\Program Files (x86)\\ZBar\\lib;" echo $WINEPATH #start wineconsole and enter wineconsole echo %PATH% #that work for compiler but not include paths #checked what python was actually including #c:\MinGW\bin\gcc.exe -mdll -O -Wall -IC:\Python27\include -IC:\Python27\PC #moved all files in c:\Program Files (x86)\ZBar\include to c:\Python27\include #moved all files in c:\Program Files (x86)\ZBar\lib to c:\Python27]libs #moved all dlls found in zbar bin to python dlls folder, #http://www.mingw.org/wiki/includepathhowto #compiled but when ran #0152:err:module:import_dll Library libzbar-0.dll (which is needed by L"C:\\Python27\\lib\\site-packages\\zbar.pyd") not found #moved libzbar-0.dll to c:\python27\lib\site-packages and it worked #------------end zbar---- #now pil acting up #Is poppler installed and in PATH? #Windows users will have to install poppler for Windows, # then add the bin/ folder to PATH. wget http://blog.alivate.com.au/wp-content/uploads/2018/10/poppler-0.68.0_x86.7z #7zip format need to instal p7zip sudo apt-get install p7zip-full #x extract 7z x poppler-0.68.0_x86.7z #add to winepath or path set PATH=%PATH%;c:\poppler-0.68.0\bin; export WINEPATH="c:\\MinGW\\bin;c:\\Program Files (x86)\\ZBar\\include;c:\\Program Files (x86)\\ZBar\\lib;c:\\poppler-0.68.0\\bin" #works now on windows