Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'overviewer_core' #1595

Open
lostpckt-zz opened this issue Jun 25, 2019 · 34 comments
Open

ModuleNotFoundError: No module named 'overviewer_core' #1595

lostpckt-zz opened this issue Jun 25, 2019 · 34 comments

Comments

@lostpckt-zz
Copy link

lostpckt-zz commented Jun 25, 2019

Upgraded (via apt; ubuntu 18.04.2) this morning from 0.13.90-0~overviewer1 to 0.14.2-0~overviewer1. Since the upgrade it crashes immediately with the following error message.

(from overviewer.log)

Traceback (most recent call last):
  File "/usr/bin/overviewer.py", line 38, in <module>
    from overviewer_core import util
ModuleNotFoundError: No module named 'overviewer_core'
Traceback (most recent call last):
  File "/usr/bin/overviewer.py", line 38, in <module>
    from overviewer_core import util
ModuleNotFoundError: No module named 'overviewer_core'

Let me know what further information you would like and I'm happy to supply it. It was running great before the upgrade.

(full message from apt/history.log from my 'sudo apt dist-upgrade')

Install: python3-olefile:amd64 (0.45.1-1, automatic), python3-pil:amd64 (5.1.0-1, automatic), python3-numpy:amd64 (1:1.13.3-2ubuntu1, automatic)
Upgrade: minecraft-overviewer:amd64 (0.13.90-0~overviewer1, 0.14.2-0~overviewer1), snapd:amd64 (2.38+18.04, 2.39.2+18.04)

@CounterPillow
Copy link
Member

This is because we need separate packages for Ubuntu now, since it ships a newer version of Python than Debian.

@Ampernic
Copy link

This is because we need separate packages for Ubuntu now, since it ships a newer version of Python than Debian.

And what kind of packages are needed for this? (Sorry for my bad english)

@royalPanic
Copy link

I just downloaded this today, and I was hoping to use it on my Linux Mint laptop, only to find that I have the exact issue, with running the command simply returning an error:

Traceback (most recent call last):
  File "/usr/bin/overviewer.py", line 38, in <module>
    from overviewer_core import util
ModuleNotFoundError: No module named 'overviewer_core'

I saw this above;

This is because we need separate packages for Ubuntu now, since it ships a newer version of Python than Debian.

What do we need to do to fix this for linux users?

@CounterPillow
Copy link
Member

You can build from source until there are pre-built packages available for you. Instructions for this can be found in the documentation.

@Jldevictoria
Copy link

I had to clone and build from master in order for it to get to work today.

@zettix
Copy link

zettix commented Jul 4, 2019

The issue for me was the debian package wanted python3.5. On Ubuntu I typed:
dpkg -L minecraft-overviewer
And observed, for example:

/usr/lib/python3.5/dist-packages/overviewer_core/items.py

Rather than move everything over to 3.6 (my current python version), I built it.
I had to install python3 and python3-dev, I already had build-essential. See @CounterPillow 's post for the link to do this. So it worked on my Ubuntu 16.04 out of the box, but my Ubuntu 18.10 needed to be built from scratch. Until the issue is fixed with their Debian installers (following http://docs.overviewer.org/en/latest/installing/ also installs core files specific to Python 3.5) alternative means must be used. However I am very pleased with the developers for releasing a working Minecraft Overviewer with the latest Minecraft version, that is fantastic!

@Surax23
Copy link

Surax23 commented Jul 19, 2019

Good day for all. Sorry for my english in advance.

I'm using Ubuntu 18.04 and met this issue some time ago. To repair this I tried to build overviewer from source, but met the same issue while building, don't remember what was exact message, something like this: "ModuleNotFoundError: No module named 'distutils.core'".
If someone trying to build overviewer from source and met the same problem just install next packages (and build-essential too like that in manual):

sudo apt-get install python3-distutils python3-pip

@CounterPillow CounterPillow pinned this issue Jul 29, 2019
@IncredibleHolg
Copy link
Contributor

I have a working Docker build environment based on Ubuntu 18.04:

build.Dockerfile

FROM  ubuntu:18.04
RUN apt-get -y update
RUN apt-get -y install git wget curl
RUN apt-get -y install python3 python3-pil python3-numpy
RUN apt-get -y install build-essential python3-dev devscripts

create-buildimage.sh

#!/bin/bash
docker build --rm  \
  -t mc-overview -f build.Dockerfile  .

Testimage.Dockerfile

FROM mc-overview

RUN  git clone --single-branch --branch master \
         https://github.com/overviewer/Minecraft-Overviewer.git  MOV
RUN cd MOV &&\
    ls -l &&\
    curl -O https://raw.githubusercontent.com/python-pillow/Pillow/master/src/libImaging/Imaging.h;\
    curl -O https://raw.githubusercontent.com/python-pillow/Pillow/master/src/libImaging/ImagingUtils.h ;\
    curl -O https://raw.githubusercontent.com/python-pillow/Pillow/master/src/libImaging/ImPlatform.h
RUN cd MOV && python3 setup.py build &&\
     python3 overviewer.py --verbose --version
WORKDIR /MOV

docker build -t testimage -f Testimage.Dockerfile .

This is still WIP, but whith this set of packages the build works as expected.

@CounterPillow
Copy link
Member

the bigger issue is that we need to separate the repo into different codenames.

Currently we tell people to add the following source: deb https://overviewer.org/debian ./

Notice the ./ at the end, that's problematic. This means all users of apt will be trying to pull stuff from the same tree, and we can't make a package that works for all deb based distributions.

So realistically we have to separate this into the different codenames and warn people that they need to update their sources.list.

@chungy
Copy link

chungy commented Aug 2, 2019

Basically you're going to need at least stretch (Debian 9), buster (Debian 10), bullseye (Debian 11), bionic (Ubuntu 18.04), and disco (Ubuntu 19.04). Maybe also xenial (Ubuntu 16.04) if people have servers still running it.

@aymericb
Copy link

aymericb commented Aug 3, 2019

I was also using Ubuntu 18.04 via Docker and got the same issue upon updating.

As a workaround (and alternative to install from source) I downgraded to using an older version of Debian.

FROM debian:stretch

@CounterPillow
Copy link
Member

It boggles my mind people would prefer using outdated systems rather than installing 3 packages and running one command, but ok dude lmao

@SkullMasher
Copy link

SkullMasher commented Aug 27, 2019

Just in case here's how to building from source on debian buster (and probably all the other debian based distro like ubuntu). Might be great to temporary become root : su - or sudo su

apt install python3-pil python3-dev python3-numpy
cd /usr/local/src
git clone git://github.com/overviewer/Minecraft-Overviewer.git
cd Minecraft-Overviewer
python3 setup.py build
ln -s /usr/local/src/Minecraft-Overviewer/overviewer.py /usr/local/bin/mcoverviewer

That last command allows you to call overviewer.py from any user of the system by typing mcoverviewer

Btw thanks for the awesome project took me no time to setup and run. It's always satisfying.

@CounterPillow
Copy link
Member

@jsnfwlr
Copy link

jsnfwlr commented Dec 30, 2019

It boggles my mind people would prefer using outdated systems rather than installing 3 packages and running one command, but ok dude lmao

Because some people have more to consider on their servers than just 3 packages and others run their Minecraft servers on the LTS of their distro because they don't want to have to deal with full system rebuilds every 12 months

@thrusty66
Copy link

thrusty66 commented Jan 18, 2020

Hi, I just found overviewer and wanted to use it. My Minecraft server runs on Ubuntu 18.04
Unfortunately I get the same error:

.....   File "/usr/bin/overviewer.py", line 38, in <module>
 from overviewer_core import util    .....

I have installed all required packages as described. Unfortunately I got this error nevertheless. I can't tell from the above articles which OS is the right one, except the article with Docker.
I have the Minecraft Server running on an Intel NUC as VM. As I said with Ubuntu 18.04 as OS. Therefore I didn't want to start with Docker.
I hope someone can tell me a solution to my problem.

@CounterPillow
Copy link
Member

@thrusty66 remove the package, remove the repo, then build from source using our instructions.

@amadensor
Copy link

The package from the repo is expecting Python 3.5, and putting the modules there, rather than being more flexible about the version. I hope this helps correct the issues for people.

@CounterPillow
Copy link
Member

The package from the repo is expecting Python 3.5, and putting the modules there, rather than being more flexible about the version.

It's a bit more involved than this, the reason why the c_overviewer extension is in a version-specific Python directory is because the ABI between Python releases can and does change. It's not just "oh it's in the wrong directory" but "oh it's built for a different version of Python".

@amadensor
Copy link

The package from the repo is expecting Python 3.5, and putting the modules there, rather than being more flexible about the version.

It's a bit more involved than this, the reason why the c_overviewer extension is in a version-specific Python directory is because the ABI between Python releases can and does change. It's not just "oh it's in the wrong directory" but "oh it's built for a different version of Python".

Exactly. I symlinked it, and it did not help. The location was just the clue to what the issue was. I built from source and that worked fine, but hoped that this could help those maintaining the Debian packages.

@stevethepocket
Copy link

So is this a matter of every single version of Python only able to run programs compiled in that very exact specific version? Or is it something specific to 3.6 that broke some key backward compatibility?

@carljohnstone
Copy link

No. For performance reasons some of Overviewer is written in C rather than Python. That means that it has to integrate directly with the Python interpreter itself. In programing terms it uses an application binary interface (ABI).

Whilst different versions of the Python interpreter can all run the same Python code and generate the same results (bar any documented changes) behind the scenes there can be quite radical changes in how the interpreter itself works. For that reason the python devs can't guarantee that stuff using the ABI will work between different versions, so require any extensions using the ABI to be specifically compiled for that version of Python.

This means that Overviewer needs to be specifically built for each version of Python.

@Daynos
Copy link

Daynos commented Apr 27, 2020

Just in case here's how to building from source on debian buster (and probably all the other debian based distro like ubuntu). Might be great to temporary become root : su - or sudo su

apt install python3-pil python3-dev python3-numpy
cd /usr/local/src
git clone git://github.com/overviewer/Minecraft-Overviewer.git
cd Minecraft-Overviewer
python3 setup.py build
ln -s /usr/local/src/Minecraft-Overviewer/overviewer.py /usr/local/bin/mcoverviewer

That last command allows you to call overviewer.py from any user of the system by typing mcoverviewer

Btw thanks for the awesome project took me no time to setup and run. It's always satisfying.

Hi,

I have a Minecraft Server vanilla 1.15.2 runing on a VPS (Debian 10).

I tried first to install Overviewer as described in http://docs.overviewer.org/en/latest/installing/, but I get the error:

Traceback (most recent call last):
  File "/usr/bin/overviewer.py", line 38, in <module>
    from overviewer_core import util
ModuleNotFoundError: No module named 'overviewer_core'

So I tried to build from source, doing:

- sudo apt-get install build-essential
- sudo apt install python3-pil python3-dev python3-numpy
- cd /usr/local/src
- sudo git clone git://github.com/overviewer/Minecraft-Overviewer.git
- cd Minecraft-Overviewer
- sudo python3 setup.py build
- ln -s /usr/local/src/Minecraft-Overviewer/overviewer.py /usr/local/bin/mcoverviewer
- overviewer.py /home/mc/server/world /home/mc/mcmap

But I still have the previous error.

Reading more carefully what @SkullMasher wrote, I tried:

- mcoverviewer /home/mc/server/world /home/mc/mcmap

And it looks better, even if I have an other error:

2020-04-27 20:14:13  Welcome to Minecraft Overviewer!
2020-04-27 20:14:13  Generating textures...
2020-04-27 20:14:13 E Your system is missing either assets/minecraft/textures/colormap/foliage.png or assets/minecraft/textures/colormap/grass.png. Either complement your resource pack with these texture files, or install the vanilla Minecraft client to use as a fallback.
2020-04-27 20:14:13 E Could not find the textures while searching for 'assets/minecraft/textures/colormap/foliage.png'. Try specifying the 'texturepath' option in your config file.
Set it to the path to a Minecraft Resource pack.
Alternately, install the Minecraft client (which includes textures)
Also see <http://docs.overviewer.org/en/latest/running/#installing-the-textures>
(Remember, this version of Overviewer requires a 1.15-compatible resource pack)
(Also note that I won't automatically use snapshots; you'll have to use the texturepath option to use a snapshot jar)

This last error is pretty clear, I will fix it.

But I also understand that I have 2 versions of Overviewer installed on my server: the one I installed with apt-get install minecraft-overviewer and the one I built. Right? How to clean this and remove the first one? I'm quite new to Linux...

@CounterPillow
Copy link
Member

How to clean this and remove the first one? I'm quite new to Linux...

apt-get remove minecraft-overviewer

@fichdlmaa
Copy link

Same problem on Debian GNU/Linux 10 "Buster" x64 - SOLVED

Traceback (most recent call last):
File "/usr/bin/overviewer.py", line 38, in
from overviewer_core import util
ModuleNotFoundError: No module named 'overviewer_core'

The following worked for me:
(used code from posts of _ @Surax23_ and _ @SkullMasher_)

If you still have installed not working repository version, type:

sudo apt purge minecraft-overviewer

1a. activate root account if not already done ...
sudo passwd root
-> set strong password

1b. become root by typing
su -l

OR
1. pretype sudo for each of the following commands ...

2. install possibly missing python packages
apt install python3-distutils python3-pip python3-pil python3-dev python3-numpy

3. clone git repository

cd /usr/local/src
git clone git://github.com/overviewer/Minecraft-Overviewer.git

4. run python setup for it

cd Minecraft-Overviewer
python3 setup.py build

5. set softlink to /usr/local/bin/ for easy use
ln -s /usr/local/src/Minecraft-Overviewer/overviewer.py /usr/local/bin/mc-ovw

The command which mc-ovw should now give the following output:
/usr/local/bin/mc-ovw

If you worked as root, type exit to leave root subshell

  • READY!

Now assuming the following:

  • Server Directory is: /data/.mc-spigot/
  • World Subdirectory is: insulia
  • target directory for map is: mcmap

First Run

DIR=/data/.mc-spigot/
SUB=insulia
MAP=mcmap
mkdir $DIR$SUB
mc-ovw $DIR$SUB $DIR$MAP

Now be patient ;-)
2020-05-01 20:23:28 Welcome to Minecraft Overviewer!
2020-05-01 20:23:28 Generating textures...
2020-05-01 20:23:44 Preprocessing...
2020-05-01 20:24:03 Rendering 3851 total tiles.
99% [============================================================================================================================ ] 3849 29.72t/s eta 00h 00m 00s
2020-05-01 20:26:13 Rendering complete!
2020-05-01 20:26:14 Your render has been written to '/data/.mc-spigot/mcmap', open index.html to view it.

And enjoy :-D
e.g. with firefox without leaving command line:
firefox $DIR$MAP/index.html

(results in
file:///data/.mc-spigot/mcmap/index.html#/213/64/-110/-6/world/world-lighting
as browser url )

_Greets from the

FichdlMaa_

@fichdlmaa
Copy link

Awesome result with

  • SpigotMC 1.15.2 and worlds generated with
  • RealisticWorldGenerator!

Mny Tnx to dev team !!!

@lostpckt-zz
Copy link
Author

Confirmed that fichdlmaa's instructions work on Ubuntu 18.04 Bionic. Thank you for these instructions!

I still feel like this is something that should work "out of the box" if it's going to be an apt repo. While this works, it breaks trusting "sudo apt update" to actually keep all my software up to date. The onus is back on the user/admin to check to see if there is a new version of Minecraft-overviewer available and keep it up to date.

@fichdlmaa
Copy link

Surely! Ubuntu, LinuxMint and much more are all based on Debian.
But i couldn't test on Ubuntu and Co ...

I tried to only use bash commands.
Therefore it may run on Linuxes like RedHat, SuSE and so on.

@dreamwraith
Copy link
Contributor

Confirmed that fichdlmaa's instructions work on Ubuntu 18.04 Bionic. Thank you for these instructions!

I still feel like this is something that should work "out of the box" if it's going to be an apt repo. While this works, it breaks trusting "sudo apt update" to actually keep all my software up to date. The onus is back on the user/admin to check to see if there is a new version of Minecraft-overviewer available and keep it up to date.

True enough, but its simple enough to set up a cron job with a git pull and rebuild commant to run once a month.

@SilkAndSlug
Copy link

Then it's (also) a documentation bug. The instructions say to use Apt (on Debian). The instructions are wrong.

@dreamwraith
Copy link
Contributor

The documentation is accurate for the platforms it was tested against.

That said, last I checked, overviewer is a free open source project. There's buttons up top for submitting pull requests. I have submitted several documentation updates myself in the past.

@chungy
Copy link

chungy commented Jul 27, 2020

It's not really a PR thing. Whoever maintains the apt repository needs to start making separate releases for various stable versions of Debian and Ubuntu.

@dreamwraith
Copy link
Contributor

It's not really a PR thing. Whoever maintains the apt repository needs to start making separate releases for various stable versions of Debian and Ubuntu.

I replied to someone complaining about documentation.

The ppa repo is a courtesy. You could always set up your own.

@finndo77
Copy link

not to beat a dead horse, but I love what you did here and think that providing a publicly available docker image instead of an apt source would stop the repetitive comments about this "issue" and would take a lot less time than making separate repo's for builds on various systems, requiring more work for any updates made.

ion1 added a commit to ion1/Overviewer-Web that referenced this issue Dec 21, 2020
Use the python3 dependency determined by dh-python3. The current package
is installable but not usable on systems with a newer release of python3
than on the build system (see overviewer/Minecraft-Overviewer#1595).
ion1 added a commit to ion1/Overviewer-Web that referenced this issue Dec 21, 2020
Use the python3 dependency determined by dh-python. The current package
is installable but not usable on systems with a newer release of python3
than on the build system (see overviewer/Minecraft-Overviewer#1595).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests