Problems with pylith installation in Ubuntu 18.04LTS of Win10 subsystem

I am trying to insall pylith in my ubuntu,but it doesn’t work.

xuran@LAPTOP-MVOJ75MD:/mnt/d/pylith/pylith-2.2.2-linux-x86_64$ source setup.sh
Ready to run PyLith.
xuran@LAPTOP-MVOJ75MD:/mnt/d/pylith/pylith-2.2.2-linux-x86_64$ pylith
Traceback (most recent call last):
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/bin/pylith”, line 25, in
from pylith.apps.PyLithApp import PyLithApp
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/apps/PyLithApp.py”, line 23, in
from PetscApplication import PetscApplication
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/apps/PetscApplication.py”, line 24, in
from mpi import Application
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/mpi/init.py”, line 15, in
from Application import Application
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/mpi/Application.py”, line 14, in
from pyre.applications.Script import Script
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/pyre/applications/init.py”, line 19, in
from Shell import Shell
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/pyre/applications/Shell.py”, line 25, in
class Shell(Configurable):
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/pyre/applications/Shell.py”, line 36, in Shell
journal = journal.facility()
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/journal/init.py”, line 30, in facility
return JournalFacility(default)
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/journal/components/JournalFacility.py”, line 24, in init
from Journal import Journal as factory
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/journal/components/Journal.py”, line 18, in
class Journal(Component):
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/journal/components/Journal.py”, line 21, in Journal
class Inventory(Component.Inventory):
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/journal/components/Journal.py”, line 27, in Inventory
error = ChannelFacility(“error”)
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/journal/components/ChannelFacility.py”, line 21, in init
from Channel import Channel
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/journal/components/Channel.py”, line 14, in
import journal
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/journal/components/journal.py”, line 18, in
class Journal(Component):
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/journal/components/journal.py”, line 21, in Journal
class Inventory(Component.Inventory):
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/journal/components/journal.py”, line 27, in Inventory
error = ChannelFacility(“error”)
File “/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/journal/components/ChannelFacility.py”, line 21, in init
from Channel import Channel
ImportError: cannot import name Channel

Do you have the file:
“/mnt/d/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pythia-0.8.1.19-py2.7.egg/journal/components/Channel.py"

If so, in that file there should also be the line:

class Channel(Component):

If both of those are true, what is the output of:

echo $PYTHONPATH

There are both exist in my file.when I open a terminal , enter echo $PYTHONPATH and nothing will happen.

Did you do echo $PYTHONPATH and echo $PATH after doing source setup.sh? You must run source setup.sh every time you want to use PyLith unless you manually add the corresponding environment variables to your shell setup.

My guess is that there is a conflict between Channel from Pyre (installed with PyLith) and some other Python package on your system. These can be the most difficult issues to debug because we have no idea what other software is on your system. Since from Channel import Channel is what is failing, that is the place to start debugging. After you run source setup.sh, try starting Python and then importing Channel by running the following:

python
>>> from journal.components.Channel import Channel
>>> dir(Channel)
# The output should be
['ConfigurableClass', 'Inventory', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__getstate__', '__hash__', '__init__', '__metaclass__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_configure', '_defaults', '_fini', '_init', '_listing', '_showHelp', '_validate', 'applyConfiguration', 'collectDefaults', 'components', 'configureComponent', 'configureComponents', 'configureProperties', 'createInventory', 'createMetaInventory', 'createRegistry', 'facilities', 'filterConfiguration', 'fini', 'getCurator', 'getDepositories', 'getLocator', 'getTraitDescriptor', 'getTraitValue', 'getVault', 'init', 'initializeConfiguration', 'loadConfiguration', 'newConfigContext', 'properties', 'retrieveComponent', 'retrieveConfiguration', 'retrieveObject', 'retrieveTemplate', 'setCurator', 'setLocator', 'setVault', 'showComponents', 'showCurator', 'showHelp', 'showProperties', 'showUsage', 'updateConfiguration']

Thank you . After reinstalling the system, it has been successfully installed.