Help getting started with Ubuntu

Post any problems / bugs / issues that are Mylar-related in here.
Post Reply
spynotebook
Posts: 5
Joined: Sat Oct 24, 2020 5:05 pm

Help getting started with Ubuntu

Post by spynotebook »

I am brand new to mylar3 and really python in general.
I am running Python 3.8.5 on Ubuntu 20.04. When I try to start Mylar I get the following.
Any idea where to start?

Code: Select all

python3 Mylar.py
Traceback (most recent call last):
  File "Mylar.py", line 16, in <module>
    import os, sys, locale
  File "/home/chip/Downloads/mylar/locale.py", line 13, in <module>
    from natsort.compat.py23 import (
  File "/home/chip/Downloads/mylar/natsort.py", line 28, in <module>
    import natsort.compat.locale
ModuleNotFoundError: No module named 'natsort.compat'; 'natsort' is not a package
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 13, in <module>
    import fnmatch, glob, traceback, errno, sys, atexit, locale, imp
  File "/home/chip/Downloads/mylar/locale.py", line 13, in <module>
    from natsort.compat.py23 import (
  File "/home/chip/Downloads/mylar/natsort.py", line 28, in <module>
    import natsort.compat.locale
ModuleNotFoundError: No module named 'natsort.compat'; 'natsort' is not a package

Original exception was:
Traceback (most recent call last):
  File "Mylar.py", line 16, in <module>
    import os, sys, locale
  File "/home/chip/Downloads/mylar/locale.py", line 13, in <module>
    from natsort.compat.py23 import (
  File "/home/chip/Downloads/mylar/natsort.py", line 28, in <module>
    import natsort.compat.locale
ModuleNotFoundError: No module named 'natsort.compat'; 'natsort' is not a package
User avatar
evilhero
Site Admin
Posts: 2587
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Help getting started with Ubuntu

Post by evilhero »

Did you do the installation of the requirements.txt file as indicated on the readme on the github page ?

Code: Select all

run pip3 install -r requirements.txt to install all required dependencies not included.
Note that pip3 as a command might not work if you don't have any other python versions installed. If that is the case, you can just replace pip3 with pip.

If you go to run the above command and it throws back a cannot find pip type of error, then you need to install pip (as per below usually), and then try the pip installation of requirements.txt again:

Code: Select all

sudo apt update
sudo apt install python3-pip
spynotebook
Posts: 5
Joined: Sat Oct 24, 2020 5:05 pm

Re: Help getting started with Ubuntu

Post by spynotebook »

I did do that. Just did it again to make sure.

i used pip3 because I do have python 2 on this machine also. It looks like all the requirements are satisfied.

I am considering uninstalling python and then reinstalling.
User avatar
evilhero
Site Admin
Posts: 2587
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Help getting started with Ubuntu

Post by evilhero »

If you do a pip3 list, what does it show?
spynotebook
Posts: 5
Joined: Sat Oct 24, 2020 5:05 pm

Re: Help getting started with Ubuntu

Post by spynotebook »

pip3 list:

Code: Select all

Package                   Version
------------------------- ---------
altgraph                  0.17
APScheduler               3.6.3
beautifulsoup4            4.9.3
certifi                   2020.6.20
cfscrape                  2.1.1
chardet                   3.0.4
cheroot                   8.2.1
CherryPy                  18.6.0
configparser              5.0.1
feedparser                6.0.2
idna                      2.10
jaraco.classes            3.1.0
jaraco.collections        3.0.0
jaraco.functools          3.0.1
jaraco.text               3.2.0
Mako                      1.1.3
MarkupSafe                1.1.1
more-itertools            8.5.0
natsort                   7.0.1
Pillow                    6.2.2
pip                       20.0.2
portend                   2.6
pyinstaller               4.0
pyinstaller-hooks-contrib 2020.9
pytz                      2020.1
rarfile                   4.0
requests                  2.24.0
setuptools                45.2.0
sgmllib3k                 1.0.0
simplejson                3.17.2
six                       1.15.0
soupsieve                 2.0.1
tempora                   4.0.0
tzlocal                   2.1
urllib3                   1.25.11
wheel                     0.34.2
zc.lockfile               2.0
After I uninstalled and reinstalled python3 (certainly breaking something else on my machine), i get a shorter error:

Code: Select all

Traceback (most recent call last):
  File "Mylar.py", line 16, in <module>
    import os, sys, locale
  File "/home/chip/Downloads/mylar/locale.py", line 13, in <module>
    from natsort.compat.py23 import (
  File "/home/chip/Downloads/mylar/natsort.py", line 28, in <module>
    import natsort.compat.locale
ModuleNotFoundError: No module named 'natsort.compat'; 'natsort' is not a package

User avatar
evilhero
Site Admin
Posts: 2587
Joined: Sat Apr 20, 2013 3:43 pm
Contact:

Re: Help getting started with Ubuntu

Post by evilhero »

Where did you install Mylar from and how did you install it (git / source)?

Your file structure doesn't look like anything within the current mylar schema:
Your pathing of : /home/chip/Downloads/mylar/natsort.py for example, Mylar does not have natsort located outside of the lib/natsort folder, and even then it's not referenced within the program directly since it's loaded from the pip environment.

And yeah, uninstalling python on Ubuntu was probably not a good move - pyenv (virtual python environments) are the way to go if you're needing/wanting to use different versions of python that don't cause problems.
spynotebook
Posts: 5
Joined: Sat Oct 24, 2020 5:05 pm

Re: Help getting started with Ubuntu

Post by spynotebook »

That's a great question and could be the problem. I think I downloaded and extracted it and probably screwed up there. when I get home, I am going to start over from scratch and I will let you know. Thanks for your help.
spynotebook
Posts: 5
Joined: Sat Oct 24, 2020 5:05 pm

Re: Help getting started with Ubuntu

Post by spynotebook »

i had a botched download. it looks like it launches now but I need to get home before I have more than SSH to the machine. THANKS AGAIN!
Post Reply