PyPSA / linopy

Linear optimization with N-D labeled arrays in Python
https://linopy.readthedocs.io
MIT License
163 stars 45 forks source link

`linopy.version` not found with `pip install`? #187

Closed fneum closed 11 months ago

fneum commented 11 months ago

https://github.com/PyPSA/linopy/blob/c1186a3079450b3827b41203e17edfb27360b56c/linopy/__init__.py#L21

Gives ModuleNotFoundError when installed from PyPI, but not with development version pip install -e .

FabianHofmann commented 11 months ago

does that mean you cannot import linopy when installed from pypi at all? or is just the call linopy.__version__ which fails?

fneum commented 11 months ago

Could not import linopy if installed from PyPI

FabianHofmann commented 11 months ago

I just tested this and it works fine:

conda create -n test python==3.11
python -m pip install linopy
python
import linopy
linopy.Model()

The version is also displayed correctly.

fneum commented 11 months ago

Must have been a local error. Your code works for me, too and now I can't reproduce.