Cannot View Tiff Images In Kivy
problem I am able to load pictures with the Image() module in kivy. But for some reason, I can't load .tif files into kivy. When the image source is '..\pics\lugia.png', the image
Solution 1:
You need to create a proper installation I used anaconda to install kivy and I wasn't very thorough with installing the dependencies properly. So I had to create a fresh virtual python installation.
Note: This is for python version 3.5 or higher. Also I am going to have you explicitly state what python installation is going to be creating this environment. To my knowledge, there's no good reason to do this.
Windows
- (optional) find where python is installed for you.
Start windows command prompt.
C:\Users\H>
python
import sys, os
os.path.dirname(sys.executable)
C:\Users\H\AppData\Local\Programs\Python\Python36 therefore, my python installation is at C:\Users\H\AppData\Local\Programs\Python\Python36\python - Prepare a place for your new virtual environment. I created a folder called "venvs" in my home directory. C:\Users\H\venvs
- Create new virtual environment. I'll name mine "env1".
Start windows command prompt.
if you did step 1
C:\Users\H>
C:\Users\H\AppData\Local\Programs\Python\Python36\python -m venv C:\Users\H\venvs\env1
if you did not do step 1 C:\Users\H>python -m venv C:\Users\H\venvs\env1
- Activate the new virtual environment
C:\Users\H>
C:\Users\H\venvs\env1\Scripts\activate
- Install dependencies
(env1) C:\Users\H>
python -m pip install docutils pygments pypiwin32 kivy_deps.sdl2==0.1.22 kivy_deps.glew==0.1.12
- Install kivy
(env1) C:\Users\H>
python -m pip install kivy==1.11.1
- PyCharm If you're using PyCharm, go to File>Settings From the settings menu Project>Project Interpreter Click the gear>Add In the Add Python Interpreter menu select 'Existing environment', then set the interpreter to the location of your new virtual environment.Mine was C:\Users\H\venvs\env1\Scripts\python.exe. Click Okay. Hit Apply in the settings menu. Once you hit okay, your script should be able to view TIFF files.
Post a Comment for "Cannot View Tiff Images In Kivy"