Closed carterlasalle closed 3 years ago
You have to install opencv2, among other dependencies.
You can use pip
to acomplish this task: pip install -r requirements.txt
It says requirement satisfied for all three of them
Are you using the same versions?
Run pip --version
and python --version
and check if they are the same. You might need to use pip3
/python3
.
pip 20.2.4 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
What about the python one?
Python 2.7.16
I have python 3. Why is it using 2.7.16
Are you using python
or python3
to run the commands?
python
Try using python3
.
is there a way i can have it default to python 3
What OS are you using? If you are using a Linux-based one you can set an alias.
MacOS
You can try this. Although I would recommend just leaving it as python3, as is common practice.
Last login: Mon Nov 16 12:54:36 on ttys000
xr:~ xr$ cd tiler
xr:tiler xr$ pip3 install -r requirements.txt
Collecting opencv-python
Downloading opencv_python-4.4.0.46-cp39-cp39-macosx_10_13_x86_64.whl (52.4 MB)
|████████████████████████████████| 52.4 MB 22 kB/s
Collecting numpy
Downloading numpy-1.19.4-cp39-cp39-macosx_10_9_x86_64.whl (15.4 MB)
|████████████████████████████████| 15.4 MB 1.1 MB/s
Collecting tqdm
Downloading tqdm-4.52.0-py2.py3-none-any.whl (71 kB)
|████████████████████████████████| 71 kB 2.7 MB/s
Installing collected packages: numpy, opencv-python, tqdm
Successfully installed numpy-1.19.4 opencv-python-4.4.0.46 tqdm-4.52.0
WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available.
You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -m pip install --upgrade pip' command.
xr:tiler xr$ python tiler.py desktop/smexy tiles/tiles/minecraft
Traceback (most recent call last):
File "tiler.py", line 1, in
You need to run the command python3 tiler.py desktop/smexy tiles/tiles/minecraft
(replace python
with python3
).
ah ok thank you so much. it is just stuck at processing boxes
Gettting and processing boxes 0%| | 0/5 [00:00<?, ?it/s]
Depending on the resolution of the image and the size of the tiling regions, it can take a while. Since you are using the minecraft tiles I recommend setting PIXEL_SHIFT = None
, in the conf.py
file.
what will that do/turn off?
It will set the tiling region to the same size as the tiles. This means that the image will be tiled in a grid way. You can find more in the README.
File "tiler.py", line 1, in
import cv2
ImportError: No module named cv2