Python3: DistributionNotFound: The 'dijitso' distribution was not found and is required by the application
Importing dijitso
from Python 3 results in the error.
DistributionNotFound: The 'dijitso' distribution was not found and is required by the application
This is caused by the recent change in version setting (get_distribution
).
(Tentatively assigning Garth.)
Comments (7)
-
reporter -
I can't reproduce this either on my laptop or in the
ubuntu:17.04
Docker image using the following commands:apt-get update && apt-get install -y python3-pip python3-numpy python3-six python3-mpi4py git pip3 install git+https://bitbucket.org/fenics-project/dijitso.git@master#egg=dijitso python3 -c "import dijitso"
-
Ok, so this error occurs when you import
dijitso
from the source directory without any installation, like this:git clone https://bitbucket.org/fenics-project/dijitso.git cd dijitso python3 -c "import dijitso"
Same for Python 2.
-
reporter This will also cause problems when building the Debian package (which is how I found the issue); see here for reference.
-
That is only when running the tests, which has never worked when building the Debian package anyway since it did not use
pytest
. The tests can be disabled by settingexport PYBUILD_DISABLE=test
indebian/rules
, which I have already done for other packages like FFC.I am not sure how important it is to support importing from the source directory, so a suggestion is to mark this as
wontfix
unless someone volunteers to fix this. The fix will also need to be applied to FIAT, FFC, Instant and UFL. -
Agree.
-
reporter - changed status to wontfix
I agree.
- Log in to comment
What works for me in having a single source of truth of the version:
package/__about__.py
with all the meta info,import
the interesting bits from__init__.py
, andsetup.py
withSee https://packaging.python.org/single_source_version/.