Jump to content
  • 0

Installing LOKI on ubuntu issues


kazukidevnull

Question

Trying to get LOKI to work by downloading the github and installing requirements by using the following syntax:

git clone https://github.com/Neo23x0/Loki
sudo -H pip install -r requirements.txt -I

which seems to work just fine, but when i try run LOKI i get the following errors:
 

~/Downloads/Programs/Loki$ python3 loki.py

Traceback (most recent call last):

  File "/home/reverse/Downloads/Programs/Loki/loki.py", line 33, in <module>

    import psutil

ModuleNotFoundError: No module named 'psutil'

which i don't understand as "psutil" is installed by the requirement file (which i have confirmed), so i am somewhat confused. something i have missed or? 🤔

------------------------------------

i know i could download the release file, but it's numbered, so getting the latest version of it automatically is a pain, so i just find it better to download git itself and build/run it from it instead.

Edited by kazukidevnull
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 1

In your original post you use the "pip" and "python3" commands. It's possible you're on an operating system where "pip" is linked to pip2, and so you installed the dependencies for Python 2, then tried to run the script using Python 3. You can check in Linux by running "which pip" to see what binary it links to.

swankyatomic's answer is better in any case because it creates a separate virtual environment where the dependencies will be installed without interfering with your system dependencies. Don't run "pip" under "sudo", besides being a security risk, it could lead to the dependencies conflicting with system Python dependencies as they will get installed globally rather than per-user. Per-project using virtualenv is best.

  • Thanks 1
Link to comment
Share on other sites

  • 0

If it is any use to you I managed to get this to install and run on Ubuntu 22.10 x64 using a DigitalOcean instance to test it.

Assuming you have Python 3.10.

 

git clone https://github.com/Neo23x0/Loki
apt-get install build-essential python3-dev python3.10-venv -y
python3 -m venv loki
source loki/bin/activate
cd Loki/
pip install -r requirements.txt
python loki.py -h
  • Thanks 1
Link to comment
Share on other sites

  • 0
17 minutes ago, Chauke said:

Have you tried installing it by Hand ? 
 

pip install psutil

Seems like you are not alone with that.
https://github.com/Neo23x0/Loki/issues/161

It is a dependency issue. You could try to hop between commits or fixing the issue yourself.

yeah, i tried doing that as well but didn't work, and yeah, seems to be a known issue, i could try hop, but i think for now i will just put it aside for now trying to look for other alternatives and get back to it at a later time🙃

Link to comment
Share on other sites

  • 0
9 minutes ago, swankyatomic said:

If it is any use to you I managed to get this to install and run on Ubuntu 22.10 x64 using a DigitalOcean instance to test it.

Assuming you have Python 3.10.

 

git clone https://github.com/Neo23x0/Loki
apt-get install build-essential python3-dev python3.10-venv -y
python3 -m venv loki
source loki/bin/activate
cd Loki/
pip install -r requirements.txt
python loki.py -h

 by god gracious, it worked!!!, not sure why as i have to look into it more exactly, but i manage to get it to work, thx for the help!😸

Link to comment
Share on other sites

  • 0
10 hours ago, hyperreality said:

In your original post you use the "pip" and "python3" commands. It's possible you're on an operating system where "pip" is linked to pip2, and so you installed the dependencies for Python 2, then tried to run the script using Python 3. You can check in Linux by running "which pip" to see what binary it links to.

swankyatomic's answer is better in any case because it creates a separate virtual environment where the dependencies will be installed without interfering with your system dependencies. Don't run "pip" under "sudo", besides being a security risk, it could lead to the dependencies conflicting with system Python dependencies as they will get installed globally rather than per-user. Per-project using virtualenv is best.

Tried figure out how to tell which python pip was connected to and how to change it, but google was not helpful sadly. also, normally i try not use sudo with pip, but i figure it could be a permission issue with something and decided to try see if that helped, which it did not ofc.

ah, so swanky's answer worked cause it created a seperate virtual enviroment, this makes a lot more sense now, never ever used it with anything before, so i didn't think too much about it, need to look more into it clearly as i obviously don't know enough about it. anyway, thanks for the help😸

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...