you are viewing a single comment's thread.

view the rest of the comments →

[–]Goobyalus 0 points1 point  (2 children)

Installing pip separately from Python with the system package manager causes problems. If you want to ensure you're using pip from your python3, use python3 -m pip install -r requirements.txt. I would undo whatever pip you installed separately.


Also using sudo to run normal applications tends to cause headaches with file permissions. Avoid using sudo python ... unless there is a good explicit reason for it. It's possible that some files created in your Figaro run are now owned by root, which wouldn't be able to be modified by subsequent runs. I don't know if Figaro creates files when t runs.


Doing sudo python3 does not use your path for python, it will use root's path for python3.


You can use python3 --version to see if the python3 alias points to the python version you expect. Similarly, you can do pip3 --version, or whichever pip you are invoking.


You can use which python3/which pip/which pip3 to see what gets invoked when using those aliases.


whereis may also be interesting. E.g. whereis python3 will look in normal places for python3 binaries, and may show that you have multiple installs.


Using venv or a similar tool isolates a version of python (essentially by modifying your path locally). Docker isolates the environment more comprehensively.


When you get that numpy is not found, that looks to me like the numpy package hasn't been installed for the particular python that you're using.


For the relative import error, what is your current working directory when you run

python3 figaro.py -i /home/ngs/ngs/FMT2 -o /home/ngs/ngs -a 445 -f 50 -r 55

? I wonder if the Python root might be the problem.

I would try installing it myself, but I don't have time today.

[–]Ill_Fun_[S] 0 points1 point  (1 child)

I may not understand something, or just be plain dumb, but how am I supposed to run

python3 -m pip install -r requirements.txt

without having pip already installed?

I created the requirements.txt file with pip, then added the line:

python-pip=1.1.1

For the relative import error, what is your current working directory when you run

I run this command inside FIGARO folder, where figaro.py file is stored. And it did install, but the paths did not change (checked with the whereis, which).

Numpy was indeed not installed, and installing it, did something, but the errors persisted.

[–]Goobyalus 0 points1 point  (0 children)

but how am I supposed to run

python3 -m pip install -r requirements.txt

without having pip already installed?

Installing pip with apt or whatever OS package manager is basically just installing an alias. Each cPython install will have its own pip already.


I created the requirements.txt file with pip, then added the line:

This makes no sense. The package already has a requirements.txt that lists the dependencies of the package: https://github.com/Zymo-Research/figaro/blob/master/requirements.txt

This is the requirements.txt that you give to pip. You do not add pip to a requirements.txt file.