Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors when not root #4

Closed
unittech opened this issue Apr 30, 2021 · 12 comments
Closed

errors when not root #4

unittech opened this issue Apr 30, 2021 · 12 comments

Comments

@unittech
Copy link

Hi there

i installed no issue using the steps here and works fine as root.

but i need non root users to use this

i get this error

lsseq
Traceback (most recent call last):
File "/usr/local/bin/lsseq", line 62, in
import seqLister
ModuleNotFoundError: No module named 'seqLister'

@jrowellfx
Copy link
Owner

Thanks - and sorry for the trouble.

What type of system are you installing on? (win, mac, linux?)

Did you grab the latest "tarball" (or any tarball) and install from it?

Did you try to run lsseq as root before you tried as regular user?

Have you successfully installed other python libraries onto your system before?

I (and other users) have successfully installed on both mac and linux without these issues, so this is perplexing. I'd like to get it straightened out, so please let me know if you discover a solution.

You might want to try totally removing the installation, and then redoing it?

@jrowellfx
Copy link
Owner

jrowellfx commented May 4, 2021

@unittech - I have discovered this same issue when trying to run another util of mine that uses that library. Only on my mac. I'm digging into how to fix it. Stand by please. I believe I need to update my installation method, my use of setup.py might be a little out-of-date.

@unittech
Copy link
Author

unittech commented May 4, 2021

Sorry for the delay.
we're using centos 7.6
i use Root to install then switch user to a domain user to test.

Thanks

@unittech
Copy link
Author

Hi there,

Any update on this?
We're really keen to give this tool to our users.

Thanks

@jrowellfx
Copy link
Owner

Apologies for not having a solution yet. The answer is somewhere in here: https://www.pypa.io/en/latest/

Unfortunately I have been busy on another project and not able to devote sufficient time to it. If anyone on your team there would like to take a crack at fixing the use of my “setup.py”, you could fork my repo and try yourself, if you solve the problem you could share the solution with us, it would certainly be greatly appreciated.

Otherwise, I’ll try to get to it asap. Sorry for the delay.

@jrowellfx
Copy link
Owner

@unittech - I think I know how I'm going to approach this problem. I need to separate the seqLister library from lsseq, then publish and register it with the Python Packaging Index. In that way, the library should be installed in a standard way (an updated and more modern method than my setup.py technique before) so that other command line tools (and I have a few) can easily use it. Standby, I'm working on it when I have time. Stay tuned!

@jrowellfx
Copy link
Owner

@unittech - This should be fixed now. Much work has been done restructuring several of my git repo/python packages/libraries etc. Try following the README.md on lsseq's home page here, and things should be working now. Sorry it took so long, but work has kept me busy, and I had much to learn to get this working correctly. Thanks for your patience!

@unittech
Copy link
Author

as far as i'm aware i've tried the latest version (installed on a fresh system) and i get the following

Traceback (most recent call last):
File "/usr/local/bin/lsseq", line 7, in
from lsseq.main import main
ModuleNotFoundError: No module named 'lsseq'
[chris.booth@commercials03 root]$

@jrowellfx
Copy link
Owner

How exactly did you install it?

Suggestion: what happens if you try to install the "cowsay" command the same way as lsseq? (Cowsay is a fun little test program).

@unittech
Copy link
Author

python3 -m pip install lsseq

[root@commercials03 ~]# cowsay hello


| hello |

 \
  \
    ^__^
    (oo)\_______
    (__)\       )\/\
        ||----w |
        ||     ||

Works as root, as non root is below

[root@commercials03 ~]# su sid
commercials03:/root > cowsay sid
Traceback (most recent call last):
File "/usr/local/bin/cowsay", line 7, in
from cowsay.main import cli
ModuleNotFoundError: No module named 'cowsay'
commercials03:/root >

@jrowellfx
Copy link
Owner

Thanks for checking that. Looks like your issues are how you are installing packages, not with lsseq. I'm not the best person to help you debug that stuff, but something helpful might be in the "addendum" that I added to lsseq's main README.md page. FWIW it took me a while to figure out how to use venv properly etc., so this may be related to your issues too.

@jrowellfx
Copy link
Owner

@unittech - Please let me know how you fare. To give you an idea of some trouble I experienced, and how I fixed it you might want to read through this quickly. pypa/packaging-problems#510

That might be overkill, as all you are trying to do is install a package, not build it, but if you tried updating some packages as root (without being in a venv) then you MIGHT get yourself into trouble. I did and I had to undo some updates, clean them up, then take a safer approach.

Lastly, this thread is where I learned about how to install packages so they are avail to all users site-wide, and it's how I came up with my "addendum" in my README.md. Check it out FYI: https://discuss.python.org/t/how-do-you-install-a-command-line-package-site-wide-e-g-cowsay/9462

Like I said, please let me know how things are working out for you.
Good luck!
James.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants