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

Files are missing in win packages after reorganization of Python.cmake #1225

Open
jimbob88 opened this issue Mar 31, 2020 · 13 comments · Fixed by #1235
Open

Files are missing in win packages after reorganization of Python.cmake #1225

jimbob88 opened this issue Mar 31, 2020 · 13 comments · Fixed by #1235
Labels
area: buildsystem Related to our cmake/python buildsystem bug Behaving differently as it should behave os: windows Windows-specific issue packaging Bundling openage for distribution

Comments

@jimbob88
Copy link

I am not properly sure if this is the correct place to put this as it says to open an issue on the numpy page, yet I assume it is something to do with the way openage is being packaged on the windows nightly builds. When I downloaded the latest build, the Zip wouldn't open in Windows File Explorer:
Windows File Explorer Error
So I unzipped it with 7zip and ran openage.bat and got the following error:

>openage.bat
Traceback (most recent call last):
  File "C:\Users\black\Downloads\openage\python\numpy\core\__init__.py", line 24, in <module>
    from . import multiarray
  File "C:\Users\black\Downloads\openage\python\numpy\core\multiarray.py", line 14, in <module>
    from . import overrides
  File "C:\Users\black\Downloads\openage\python\numpy\core\overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "runpy.py", line 192, in _run_module_as_main
  File "runpy.py", line 85, in _run_code
  File "C:\Users\black\Downloads\openage\python\openage\__main__.py", line 136, in <module>
    sys.exit(main())
  File "C:\Users\black\Downloads\openage\python\openage\__main__.py", line 88, in main
    from .convert.singlefile import init_subparser
  File "C:\Users\black\Downloads\openage\python\openage\convert\singlefile.py", line 11, in <module>
    from .texture import Texture
  File "C:\Users\black\Downloads\openage\python\openage\convert\texture.py", line 8, in <module>
    import numpy
  File "C:\Users\black\Downloads\openage\python\numpy\__init__.py", line 142, in <module>
    from . import core
  File "C:\Users\black\Downloads\openage\python\numpy\core\__init__.py", line 54, in <module>
    raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.8 from "C:\Users\black\Downloads\openage\python\python.exe",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.18.2" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: No module named 'numpy.core._multiarray_umath'

I thought maybe it was just the Zipped version of the AMD64 build so I tried the 7z version and got the same error and then as a last resort I tried out the x86 build and got the error, but I assume this is just because I don't have a 32 bit system:

>openage.bat
Traceback (most recent call last):
  File "runpy.py", line 192, in _run_module_as_main
  File "runpy.py", line 85, in _run_code
  File "C:\Users\black\Downloads\openage-v0.4.0-98-geb8b8e9e-x86-portable_NIGHTLY\python\openage\__main__.py", line 136, in <module>
    sys.exit(main())
  File "C:\Users\black\Downloads\openage-v0.4.0-98-geb8b8e9e-x86-portable_NIGHTLY\python\openage\__main__.py", line 129, in main
    return args.entrypoint(args, cli.error)
  File "C:\Users\black\Downloads\openage-v0.4.0-98-geb8b8e9e-x86-portable_NIGHTLY\python\openage\game\main.py", line 32, in main
    from .main_cpp import run_game
ImportError: DLL load failed while importing main_cpp: The specified module could not be found.

Then, to try and remedy the fact numpy wasn't working, I downloaded get-pip.py and ran > python\python.exe get-pip.py, it said it installed so I then ran > python\Scripts\pip.exe install numpy and it gave me the error: ModuleNotFoundError: No module named 'pip'.
So I installed numpy on my computer and copied all the files in C:\Program Files\Python38\Lib\site-packages\numpy into openage\python\numpy. This resulted in me getting the error:

Traceback (most recent call last):
  File "runpy.py", line 192, in _run_module_as_main
  File "runpy.py", line 85, in _run_code
  File "C:\Users\black\Downloads\openage\python\openage\__main__.py", line 136, in <module>
    sys.exit(main())
  File "C:\Users\black\Downloads\openage\python\openage\__main__.py", line 88, in main
    from .convert.singlefile import init_subparser
  File "C:\Users\black\Downloads\openage\python\openage\convert\singlefile.py", line 11, in <module>
    from .texture import Texture
  File "C:\Users\black\Downloads\openage\python\openage\convert\texture.py", line 10, in <module>
    from PIL import Image
  File "C:\Users\black\Downloads\openage\python\PIL\Image.py", line 69, in <module>
    from . import _imaging as core
ImportError: cannot import name '_imaging' from 'PIL' (C:\Users\black\Downloads\openage\python\PIL\__init__.py)

And on using the same approach with PIL, I got the error:

Traceback (most recent call last):
  File "runpy.py", line 192, in _run_module_as_main
  File "runpy.py", line 85, in _run_code
  File "C:\Users\black\Downloads\openage\python\openage\__main__.py", line 136, in <module>
    sys.exit(main())
  File "C:\Users\black\Downloads\openage\python\openage\__main__.py", line 129, in main
    return args.entrypoint(args, cli.error)
  File "C:\Users\black\Downloads\openage\python\openage\game\main.py", line 32, in main
    from .main_cpp import run_game
ModuleNotFoundError: No module named 'openage.game.main_cpp'

At this point I was stumped, hope one of you can fix this.

Thanks a lot in advance,
James

@simonsan
Copy link
Contributor

simonsan commented Mar 31, 2020

Hey there,
two things seem strange:

First, there is no package with the Zip extension as the error tells you: openage-v0.4.0-100-geb8f3c66-amd64-installer_NIGHTLY.exe.zip

The installer is an actual packaged installer and the portable version you can unpack using 7zip. I don't know where your zip-extension comes from, honestly. Can you re-download the latest nightly portable version, unpack it using 7zip and start openage with openage.bat and give feedback on the errors?

Second, it seems like you have installed Python 3.8 on your device, is that the case?

@simonsan simonsan added bug Behaving differently as it should behave packaging Bundling openage for distribution os: windows Windows-specific issue labels Mar 31, 2020
@jimbob88
Copy link
Author

Hey there,
Yeah I do have python 3.8 installed, and I went to this link as your link (Your link has a random colon it) said The requested path was not found. and if you click openage-amd64-installer_NIGHTLY-latest.exe (I'm using FireFox by the way) it downloads it to the file openage-amd64-installer_NIGHTLY-latest.exe.zip but if I use chrome it downloads it to an exe file??? Dunno what happened there!

So when I download the exe with chrome, is downloads properly, the installer installs to C:\Program Files\openage (no start menu link made not sure if it should), so I cd C:\Program Files\openage and run openage.bat:

>openage.bat
Traceback (most recent call last):
  File "C:\Program Files\openage\python\numpy\core\__init__.py", line 24, in <module>
    from . import multiarray
  File "C:\Program Files\openage\python\numpy\core\multiarray.py", line 14, in <module>
    from . import overrides
  File "C:\Program Files\openage\python\numpy\core\overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "runpy.py", line 192, in _run_module_as_main
  File "runpy.py", line 85, in _run_code
  File "C:\Program Files\openage\python\openage\__main__.py", line 136, in <module>
    sys.exit(main())
  File "C:\Program Files\openage\python\openage\__main__.py", line 88, in main
    from .convert.singlefile import init_subparser
  File "C:\Program Files\openage\python\openage\convert\singlefile.py", line 11, in <module>
    from .texture import Texture
  File "C:\Program Files\openage\python\openage\convert\texture.py", line 8, in <module>
    import numpy
  File "C:\Program Files\openage\python\numpy\__init__.py", line 142, in <module>
    from . import core
  File "C:\Program Files\openage\python\numpy\core\__init__.py", line 54, in <module>
    raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.8 from "C:\Program Files\openage\python\python.exe",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.18.2" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: No module named 'numpy.core._multiarray_umath'

I then tried the 7z on the downloads page (downloaded that one with FireFox) and got the error:

\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY>openage.bat
Traceback (most recent call last):
  File "C:\Users\black\Downloads\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\numpy\core\__init__.py", line 24, in <module>
    from . import multiarray
  File "C:\Users\black\Downloads\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\numpy\core\multiarray.py", line 14, in <module>
    from . import overrides
  File "C:\Users\black\Downloads\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\numpy\core\overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "runpy.py", line 192, in _run_module_as_main
  File "runpy.py", line 85, in _run_code
  File "C:\Users\black\Downloads\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\openage\__main__.py", line 136, in <module>
    sys.exit(main())
  File "C:\Users\black\Downloads\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\openage\__main__.py", line 88, in main
    from .convert.singlefile import init_subparser
  File "C:\Users\black\Downloads\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\openage\convert\singlefile.py", line 11, in <module>
    from .texture import Texture
  File "C:\Users\black\Downloads\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\openage\convert\texture.py", line 8, in <module>
    import numpy
  File "C:\Users\black\Downloads\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\numpy\__init__.py", line 142, in <module>
    from . import core
  File "C:\Users\black\Downloads\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\numpy\core\__init__.py", line 54, in <module>
    raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.8 from "C:\Users\black\Downloads\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\python.exe",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.18.2" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: No module named 'numpy.core._multiarray_umath'

Seems the same error keeps coming to bite me! @_@

As seen as FireFox has been messing up with these download links I decided to download the 7z file with chrome, same issue though:

\openage-amd64-portable_NIGHTLY-latest (1)\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY>openage.bat
Traceback (most recent call last):
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest (1)\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\numpy\core\__init__.py", line 24, in <module>
    from . import multiarray
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest (1)\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\numpy\core\multiarray.py", line 14, in <module>
    from . import overrides
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest (1)\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\numpy\core\overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "runpy.py", line 192, in _run_module_as_main
  File "runpy.py", line 85, in _run_code
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest (1)\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\openage\__main__.py", line 136, in <module>
    sys.exit(main())
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest (1)\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\openage\__main__.py", line 88, in main
    from .convert.singlefile import init_subparser
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest (1)\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\openage\convert\singlefile.py", line 11, in <module>
    from .texture import Texture
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest (1)\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\openage\convert\texture.py", line 8, in <module>
    import numpy
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest (1)\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\numpy\__init__.py", line 142, in <module>
    from . import core
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest (1)\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\numpy\core\__init__.py", line 54, in <module>
    raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.8 from "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest (1)\openage-v0.4.0-125-g6467e268-amd64-portable_NIGHTLY\python\python.exe",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.18.2" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: No module named 'numpy.core._multiarray_umath'

Thanks very much for your time,
Jim

@simonsan simonsan added the area: buildsystem Related to our cmake/python buildsystem label Mar 31, 2020
@simonsan
Copy link
Contributor

I investigated the error. It seemed strange to me, that it asks for Python 3.8 as that is currently unsupported by us due to #1201 .

The build log says:

-- Found PythonLibs: optimized;C:/Python38-x64/libs/python38.lib;debug;C:/Python38-x64/libs/python38_d.lib (found version "3.8.0") 
-- Using python interpreter: C:/Tools/Python37-x64-dbg/python.exe
-- Found Python: C:/Tools/Python37-x64-dbg/python.exe (Required is at least version "3.6") 
-- Found Cython: C:/Tools/Python37-x64-dbg/python.exe -m cython (found suitable version "0.29.16", minimum required is "0.25") 
-- Found numpy: C:\Tools\Python37-x64-dbg\lib\site-packages\numpy\core\include

So it's using Python 3.8 libs with Python 3.7 interpreter to build that stuff. CPack packages Python 3.8 because of the libs. More than one Python installation on Windows (as it is usual to have on the bigger CI systems online) is still making many problems of different kinds. I will look into it the next week.

@simonsan simonsan changed the title Windows Nightly Build can't import numpy c-extensions Buildsystem is automatically chosing wrong Python version Mar 31, 2020
@jimbob88
Copy link
Author

Cool, thanks for your help

For now I guess I'll just mess around with it on Linux 👍

Hopefully the build system bucks its ideas up,
James

@simonsan simonsan changed the title Buildsystem is automatically chosing wrong Python version Buildsystem is automatically chosing wrong Python lib version Mar 31, 2020
@SFTbot
Copy link

SFTbot commented Apr 1, 2020

This issue has been mentioned on openage Forum. There might be relevant details there:

https://openage.discourse.group/t/openage-and-python-on-windows/99/1

@simonsan
Copy link
Contributor

@jimbob88 The latest working packaged version is this here I figured:
https://dl.bintray.com/simonsan/openage-packages/openage-v0.4.0-60-g323e7c1a-amd64-portable_NIGHTLY.7z

If you want to try it on Windows ;-)

@jimbob88
Copy link
Author

Hi there,

Sorry for the late reply didn't see the email!

Yes, I didn't get the same errors with the build you linked, it seems to work perfectly (Sadly couldn't test opening because I have Rise of Rajas installed ATM):

INFO [py] launching openage v0.4.0-60-g323e7c1a
INFO [py] compiled by MSVC 19.16.27032.1
INFO [py] No converted assets have been found
INFO [py] Game specification version file not found.
INFO [py] Converting graphics, interface, metadata, sounds
INFO [py] Will save to 'C:\Users\black\AppData\Roaming\openage\assets'
Could not find any installation directory automatically.
Please enter an AOE2 install path manually.
> D:\SteamLibrary\steamapps\common\Age2HD
converting from 'D:\SteamLibrary\steamapps\common\Age2HD'
WARN [py] You have installed incompatible game version(s):
WARN [py]  * Age of Empires 2: HD + Rise of the Rajas (Version 5.x)
WARN [py] You need at least one of:
WARN [py]  * Age of Empires 2: The Conquerors
WARN [py]  * Age of Empires 2: The Conquerors, Patch 1.0c
WARN [py]  * Age of Empires 2: Forgotten Empires
WARN [py]  * Age of Empires 2: HD Edition (Version 3.0+)
WARN [py]  * Age of Empires 2: HD + Forgotten Empires (Version 4.0+)
WARN [py]  * Age of Empires 2: HD + African Kingdoms (Version 4.7+)
 ERR [py] game asset conversion failed

Thanks very much for your help, the portable version works, tested version: openage-v0.4.0-60-g323e7c1a-amd64-portable_NIGHTLY.7z

However, the installer I tried: openage-v0.4.0-100-geb8f3c66-amd64-installer_NIGHTLY(1).exe, failed to open with the same error as before:

PS C:\Program Files\openage> .\openage.bat
Traceback (most recent call last):
  File "C:\Program Files\openage\python\numpy\core\__init__.py", line 17, in <module>
    from . import multiarray
  File "C:\Program Files\openage\python\numpy\core\multiarray.py", line 14, in <module>
    from . import overrides
  File "C:\Program Files\openage\python\numpy\core\overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "runpy.py", line 192, in _run_module_as_main
  File "runpy.py", line 85, in _run_code
  File "C:\Program Files\openage\python\openage\__main__.py", line 136, in <module>
    sys.exit(main())
  File "C:\Program Files\openage\python\openage\__main__.py", line 88, in main
    from .convert.singlefile import init_subparser
  File "C:\Program Files\openage\python\openage\convert\singlefile.py", line 11, in <module>
    from .texture import Texture
  File "C:\Program Files\openage\python\openage\convert\texture.py", line 8, in <module>
    import numpy
  File "C:\Program Files\openage\python\numpy\__init__.py", line 142, in <module>
    from . import core
  File "C:\Program Files\openage\python\numpy\core\__init__.py", line 47, in <module>
    raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.8 from "C:\Program Files\openage\python\python.exe",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.17.4" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: No module named 'numpy.core._multiarray_umath'

Thanks again,

Jim

@simonsan
Copy link
Contributor

Yes, I didn't get the same errors with the build you linked, it seems to work perfectly (Sadly couldn't test opening because I have Rise of Rajas installed ATM)

Hey there, you can check our Troubleshooting Guide for the Asset Conversion. Basically you need to set AoE2:HD to the beta branch for Version 4.3. Currently 5.8 (newest) is unsupported, that will change with the new revision of the converter though. ;-)

@jimbob88
Copy link
Author

Hi thanks for getting back,

Yes that worked for me,

Thought I should reiterate that the same error occurs with the installer build,

Thanks again,

Jim

@simonsan
Copy link
Contributor

@jimbob88 Let's see, if the Nightly package works. Will reopen, if I see any problems. Cheers.

@jimbob88
Copy link
Author

Hey there @simonsan

I just tried out the latest build from the bintray and it failed again:

> .\openage.bat
Traceback (most recent call last):
  File "C:\Program Files\openage\python\numpy\core\__init__.py", line 24, in <module>
    from . import multiarray
  File "C:\Program Files\openage\python\numpy\core\multiarray.py", line 14, in <module>
    from . import overrides
  File "C:\Program Files\openage\python\numpy\core\overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "runpy.py", line 192, in _run_module_as_main
  File "runpy.py", line 85, in _run_code
  File "C:\Program Files\openage\python\openage\__main__.py", line 140, in <module>
    sys.exit(main())
  File "C:\Program Files\openage\python\openage\__main__.py", line 92, in main
    from .convert.singlefile import init_subparser
  File "C:\Program Files\openage\python\openage\convert\singlefile.py", line 11, in <module>
    from .texture import Texture
  File "C:\Program Files\openage\python\openage\convert\texture.py", line 8, in <module>
    import numpy
  File "C:\Program Files\openage\python\numpy\__init__.py", line 142, in <module>
    from . import core
  File "C:\Program Files\openage\python\numpy\core\__init__.py", line 54, in <module>
    raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.8 from "C:\Program Files\openage\python\python.exe",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.18.3" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: No module named 'numpy.core._multiarray_umath'

I used the installer for that run, after renaming it from a .zip -> .exe, and then went into the folder to run the .bat file.

Next, I tested the .7z file, no luck:

openage-amd64-portable_NIGHTLY-latest\openage-v0.4.0-133-ge7bb9199-amd64-portable_NIGHTLY> .\openage.bat
Traceback (most recent call last):
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest\openage-v0.4.0-133-ge7bb9199-amd64-portable_NIGHTLY\python\numpy\core\__init__.py", line 24, in <module>
    from . import multiarray
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest\openage-v0.4.0-133-ge7bb9199-amd64-portable_NIGHTLY\python\numpy\core\multiarray.py", line 14, in <module>
    from . import overrides
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest\openage-v0.4.0-133-ge7bb9199-amd64-portable_NIGHTLY\python\numpy\core\overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "runpy.py", line 192, in _run_module_as_main
  File "runpy.py", line 85, in _run_code
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest\openage-v0.4.0-133-ge7bb9199-amd64-portable_NIGHTLY\python\openage\__main__.py", line 140, in <module>
    sys.exit(main())
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest\openage-v0.4.0-133-ge7bb9199-amd64-portable_NIGHTLY\python\openage\__main__.py", line 92, in main
    from .convert.singlefile import init_subparser
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest\openage-v0.4.0-133-ge7bb9199-amd64-portable_NIGHTLY\python\openage\convert\singlefile.py", line 11, in <module>
    from .texture import Texture
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest\openage-v0.4.0-133-ge7bb9199-amd64-portable_NIGHTLY\python\openage\convert\texture.py", line 8, in <module>
    import numpy
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest\openage-v0.4.0-133-ge7bb9199-amd64-portable_NIGHTLY\python\numpy\__init__.py", line 142, in <module>
    from . import core
  File "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest\openage-v0.4.0-133-ge7bb9199-amd64-portable_NIGHTLY\python\numpy\core\__init__.py", line 54, in <module>
    raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.8 from "C:\Users\black\Downloads\openage-amd64-portable_NIGHTLY-latest\openage-v0.4.0-133-ge7bb9199-amd64-portable_NIGHTLY\python\python.exe",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.18.3" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: No module named 'numpy.core._multiarray_umath'

I am not sure if the nightly build should be fixed? But it didn't work on my system.

Thanks very much in advance,

Jim

@simonsan
Copy link
Contributor

@jimbob88 The nightly builds, where this change will be included, will be done at 12 p.m. every night. ;-)

@simonsan simonsan reopened this Apr 30, 2020
@simonsan
Copy link
Contributor

simonsan commented Apr 30, 2020

The packaging pipeline needs to be adopted to the new Python.cmake (it seems). The packaged version is missing 13 MiB of files. Will need to investigate that further.

Edit: Indeed, it looks like if the Python modules don't get copied over.

@simonsan simonsan changed the title Buildsystem is automatically chosing wrong Python lib version Files are missing in win packages after reorganization of Python.cmake Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: buildsystem Related to our cmake/python buildsystem bug Behaving differently as it should behave os: windows Windows-specific issue packaging Bundling openage for distribution
Projects
None yet
3 participants