[mapserver-users] Mapscript Python module version 7.6.0 not working with Python 3 > 3.6

Seth G sethg at geographika.co.uk
Thu Apr 14 08:43:35 PDT 2022


Hi,

The wheels at https://pypi.org/project/mapscript/ are only available for Windows [1]. There is also a source distribution, but it would also require the MapServer soource and dependencies to build. 

Universal Wheels for Linux would only be possible by using manylinux [2], but I've not been able to compile MapServer with this. 
For other options (including creating your own Linux Wheels for your MapServer builds that can be installed in a virtual environment) see the sections "Installation on Unix" and "Building the Mapscript Module" at https://pypi.org/project/mapscript/

Seth


[1] https://pypi.org/project/mapscript/#files
[2] https://github.com/pypa/manylinux
--
web:https://geographika.net
twitter: @geographika


On Thu, Apr 14, 2022, at 10:39 AM, Marco Beri wrote:
> Dear Mapserver Users,
> I was not able to find a way to open an issue with this project https://pypi.org/project/mapscript/7.6.0/
> 
> If you try to import the current mapserver module with Python 3 version major than 3.6 (which already reached his end of life) you encounter this error:
> 
>> ImportError: cannot import name '_mapscript' from partially initialized module 'mapscript' (most likely due to a circular import) 
> 
> Would you help me find a way to open a ticket or to do a pull request or whatever is the best way to help the developers to fix this problem?
> 
> Thanks a lot.
> 
> Ciao.
> Marco.
> P.S. You can easily reproduce it with these 3 simple steps (and a Python version 3.8 or greater):
> 
>> pip install mapscript
>> python
>> >>> import mapscript
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File "/home/marcob/.virtualenvs/mapscript/lib/python3.9/site-packages/mapscript/__init__.py", line 2, in <module>
>>     from .mapscript import *
>>   File "/home/marcob/.virtualenvs/mapscript/lib/python3.9/site-packages/mapscript/mapscript.py", line 13, in <module>
>>     from . import _mapscript
>> ImportError: cannot import name '_mapscript' from partially initialized module 'mapscript' (most likely due to a circular import) (/home/marcob/.virtualenvs/mapscript/lib/python3.9/site-packages/mapscript/__init__.py)
>> >>> 
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20220414/acfa090c/attachment.htm>


More information about the MapServer-users mailing list