JeremyBYU / bpyproj

A blender add-on for Map Projections
GNU General Public License v3.0
6 stars 1 forks source link

Problem with pyproj #18

Closed MartinGebske closed 2 years ago

MartinGebske commented 2 years ago

Hey folks, For our Blender Scene we need a custom projection. And so I downloaded the Blender Map Projection Plugin.

I might be too stupid for this. I'm on Windows and downloaded the pyproj files from the link in the error message. Now the question is what should I do with it? Put it in some folder? I've got three folders:

info, Lib, Scripts

scripts contains an exe file which appearently do nothing.

I have QGis installed, also executed the OSGeo4 Setup (with obvious no impact)... Could you please give me a small hint what to do next?

Thanks in advance!

JeremyBYU commented 2 years ago

Hi, Hi what version of blender are you running? I will try and see if I have time to update this repo. In the meantime you can download this repository. Unzip the zip file, place the downloaded files in the dependencies/binaries folder. Try to make sure its the same structure as the others. Then rezip and try to install in blender again.

I think that should work!

MartinGebske commented 2 years ago

Wow! Thanks for the instant reply :) I'm using Blender 2.93 ... I tried to follow your instructions but maybe I'm missing something or it doesn't work. I think the issue is sitting in front of the screen here ;)

vvoovv commented 2 years ago

Hi @MartinGebske

Please follow the installation instructions: https://github.com/JeremyBYU/bpyproj#install-procedure

MartinGebske commented 2 years ago

I did so. I've got the following in the System Console: ERROR:dependencies:Pyproj package is not currently available for you system ERROR:dependencies:Can be downloaded manually from this url: https://anaconda.org/conda-forge/pyproj/files After downloading them I (think) did like, Jeremy told me. But always ended up with the same Error message... :/

vvoovv commented 2 years ago

The latest versions of Blender use higher versions of Python. We need to add the libraries for those versions of Python in the bpyproj addon. This will be done till the end of this week.

vvoovv commented 2 years ago

@JeremyBYU

I tried to copy the content of the file https://anaconda.org/conda-forge/pyproj/3.3.0/download/win-64/pyproj-3.3.0-py310h62b90f0_2.tar.bz2 for Blender 3.1 on Windows to the folder _bpyproj/dependencies/binaries/windows_64310/.

I got the error Error: DLL load failed while importing _network: The specified module could not be found.

Could you please take a look?

vvoovv commented 2 years ago

I've localized the problem for Blender 3.1 on Windows:

import pyproj

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "C:\Users\vvoovv\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\bpyproj\dependencies\binaries\windows_64_310\site-packages\pyproj\__init__.py", line 49, in <module>
    import pyproj.network
  File "C:\Users\vvoovv\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\bpyproj\dependencies\binaries\windows_64_310\site-packages\pyproj\network.py", line 10, in <module>
    from pyproj._network import (  # noqa: F401 pylint: disable=unused-import
ImportError: DLL load failed while importing _network: The specified module could not be found
vvoovv commented 2 years ago

A solution to the same problem was posted in the pyproj repository:

My issue get resolved using Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, and 2019.

It looks quite complicated now.

vvoovv commented 2 years ago

A walkaround would be to use an earlier version of Python (2.8x).

JeremyBYU commented 2 years ago

Yeah that does look like a big can of worms!

vvoovv commented 2 years ago

A walkaround would be to use an earlier version of Python (2.8x).

I meant an earlier version of Blender (2.8x). But that also means an earlier version of Python (3.7 instead of 3.9 or 3,10)

MartinGebske commented 2 years ago

Ok, I gave it a try with Blender 2.80 and just for safety installed Python 3.70 I managed to enable BLOSM and BPYPROJ Addons. But I can't see where I could change the Proj4 Params? The Settings Section in the OSM Panel hasn't changed so far... (not like in the screenshots). But I don't get any errors so far... yeeey. :D BLOSMPROJ

vvoovv commented 2 years ago

Is bpyproj really installed?

MartinGebske commented 2 years ago

I think this looks ok so far... enabled

vvoovv commented 2 years ago

Are there any error messages related to bpyproj or blender-osm in the Blender's System Console?

MartinGebske commented 2 years ago

Nope.

That's in the Blender System Console... Read prefs: C:\Users\z0154113\AppData\Roaming\Blender Foundation\Blender\2.80\config\userpref.blend found bundled python: C:\Program Files\Blender Foundation\Blender\2.80\python

That's in the Console PYTHON INTERACTIVE CONSOLE 3.7.0 (default, Aug 26 2018, 16:05:01) [MSC v.1900 64 bit (AMD64)]

Command History: Up/Down Arrow Cursor: Left/Right Home/End Remove: Backspace/Delete Execute: Enter Autocomplete: Ctrl-Space Zoom: Ctrl +/-, Ctrl-Wheel Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, blf, mathutils Convenience Imports: from mathutils import ; from math import Convenience Variables: C = bpy.context, D = bpy.data

vvoovv commented 2 years ago

Here is what I did:

The bpyproj panel is there: image

MartinGebske commented 2 years ago

Hey, thanks a lot. I tried the versions and it works. I have other issues, but I'm creating a new one for this x) This issue here can be considered as closed :) Thanks for your support!