oemof / oemof-tabular

Load oemof energy systems from tabular data sources.
https://oemof-tabular.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
7 stars 5 forks source link

oemof.tabular installation process stops on three different Macs with different errors #55

Closed OHO53 closed 2 years ago

OHO53 commented 2 years ago

Dear developer team, after the successful installation of oemof.solph a while ago, I tried to installed oemof.tabular, which would fit my needs perfectly well. Unfortunately, it does not successfully install on my diverse Macs (iMac27, 4 GHz Quad-Core 7, MacBookPro 15", 2,8 GHz Quad-Core 7 and MacBookPro 16", Apple M1 Max). Es ist jeweils Python3.10 installiert.

Folgende Fehlermeldungen werden beim Abbruch der Installation ausgegeben:

- MacBookPro (Core 7):

Nach dem ausgeführten Kommando: Collecting bcrypt>=3.1.3 (from paramiko->oemof.tabular)

Kommt die Fehlermeldung:

‚Command „python setup.py egg_info“ failed with error code 1 in

/private/var/folders/7v/dymmw6f95vg0t_wzjcrpgknc0000/T/pip-install-0uqjk1j0/bcrypt/

Davor gibt es die Message:

File „…./site-packages/setuptools/importlib.py“ line 31, in if isinstance(ob, import lib_metadata.MetadataPathFinder) AttributeError: module ‚import lib_metadata‘ has not attribute ‚MetadataPathFinder‘

- iMac 27: Fast an der gleichen Stelle:

Nach dem ausgeführten Kommando: ‚Collecting pynacl>=1.0.1 (from paramiko->oemof.tabular)

‚Command „python setup.py egg_info“ failed with error code 1 in

/private/var/folders/t_/8gskjd5xx46xc2vd74lj_c2fc0000gq/T/pip-install-fb9tcwxx/pynacl/

Davor gibt es die Message:

File „…./site-packages/setuptools/importlib.py“ line 31, in if isinstance(ob, import lib_metadata.MetadataPathFinder) AttributeError: module ‚import lib_metadata‘ has not attribute ‚MetadataPathFinder‘

Das scheint der gleiche Fehler zu sein.

- MacBookPro 16“ (M1 Max):

Hier läuft die Installation sehr lange und gibt eine Unmenge Meldungen aus, bis das System versucht numpy zu installieren. Nachdem er fast fertig ist, steigt der Mac mit ‚ERROR: Command errored out with exit status 1: …

ERROR: Command errored out with exit status 1: /Users/olavhohmeyer/opt/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/24/63p96bfn3qn4k6nm7zhbj81w0000gn/T/pip-install-5hti6gps/numpy_830008914e754225aaf79cf365e77209/setup.py'"'"'; file='"'"'/private/var/folders/24/63p96bfn3qn4k6nm7zhbj81w0000gn/T/pip-install-5hti6gps/numpy_830008914e754225aaf79cf365e77209/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/24/63p96bfn3qn4k6nm7zhbj81w0000gn/T/pip-record-zfqeughl/install-record.txt --single-version-externally-managed --compile --install-headers /Users/olavhohmeyer/opt/anaconda3/include/python3.9/numpy Check the logs for full command output.

Was muss ich tun oder was müsst Ihr tun, damit die Installation funktioniert?

Für eine schnelle Antwort wäre ich Euch dankbar.

Olav

jnnr commented 2 years ago

Hi Olav, thanks for reporting! I am afraid I do not have the answer ready. I also do not have a mac to reproduce.

But I suggest that you try to follow the AttributeError: module ‚import lib_metadata‘ has not attribute ‚MetadataPathFinder‘. I found some forum entries on that topic.

Please keep us updated on your progress!

OHO53 commented 2 years ago

Hi jnnr,

it turned out to be a problem with the specific version of numpy. After forcing numpy1.17.0 into the installed software environment (virtual python3.6 environment under anaconda) the installation worked on the iMac27. Nevertheless, running a program (base_NDE_sde.py originally developed by Maruf for oemof.tabular) using oemof.tabular then produced an error while importing enum from pyutilib. I get the error message

'Import Error: pyutilib.enum has been removed. Python 3 now has an enum implementation in the standard library that supersedes this library.'

The program did not run after all.

I have seen that gplssm has run into a similar error using oemof.solph with wind node-abw, but there didn't seem to be a satisfactory answer. Could anyone give me the relevant version numbers of the packages to be imported to run oemof.tabular smoothly? Right now we seem to be running into a number of problems due to newer versions of the imported packages, which are in conflict with some of the programming in oemof.tabular. Would be great if these essentials could be specified for the installation routine! Thanks for any help on this problem.

Olav

OHO53 commented 2 years ago

The problem with the enum module was solved by deleting the existing pyomo version and and installing pyomo5.7 for the virtual environment. Now the program imports all necessary programs. So I'm down to some internal python problems, which should, hopefully, be solved within the next few days.

jnnr commented 2 years ago

Thanks again for reporting, @OHO53! We could use poetry in the future which provides a poetry.lock file specifying the versions of all used packages. Please let us know if you encounter more issues.

OHO53 commented 2 years ago

After settling the issues with pyomo5.7 a side effect was that this does not satisfy oemof 0.3.2, which requires promo < 5.7. Nevertheless, oemof.solph 0.4.3 requires promo >= 5.7. Thus, there may still be a conflict between the different specifications.