-
Notifications
You must be signed in to change notification settings - Fork 30
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
[BUG] make install in python venv leads to error message #110
Comments
Hi! Can you try using the |
Hello! Thanks so much for replying! Correct me if I'm wrong, doesn't |
That should be the case if you compile the code with the system's python. With conda (and, as far as I understand, virtualenvs) it should install the packages in your $PATH (see the docs for details). |
For reasons I don’t understand, pip installs oxpy and oat in $HOME/.local/ which isn’t on your $PATH by default. There’s probably a warning about this in the log print out about this. |
Ah! Thanks for much for clarifying. I shall redo the steps listed in the original post while using the |
I would remove the copy in .local because if you later add it to your PATH and forget it’s there, it can cause problems with pip if you try to update oxpy (see the last point in this section). The Python installation happens after compilation of oxDNA is complete. The CIRC_ASSEMBLY example doesn’t require any of the Python features so will run just fine. Only things which use oxpy to manage simulations or oat for analysis will fail if they’re not installed. |
Hi! I removed all files inside the /.local/lib directory and performed a clean install while using the Running Notable ones are:
|
First of all, thanks for trying. Regardless of this particular issue, we need to strengthen the installation of the python modules (which is a nightmare because the python ecosystem sucks big time) and this feedback is very useful.
Trying to test the different components of the installation, I run |
UPDATE: the problem with oat is due to a problem in oxpy. It looks like nucleotide positions read by python are just |
Hi! Thanks for the replies! It seems that you are installing everything within the venv directory when you are running: While I installed everything in the oxDNA directory (cloned through https by vscode) containing a venv directory. Could that be causing any issues? I will try to install it using the commands you listed and update accordingly. I also encountered the same Oxpy does seem to work fine even with the "non-normal" installation! In that I am able to run CIR_ASSEMBLY along with others in the examples directory. I am also able to use |
I am unfortunately on holiday at the moment and don’t have my computer with me to test. However, the only part of oat that gets positions from oxpy is the duplex finder. So assuming that is the only problem, everything else should work. That is a very weird bug though. |
This was done just for convenience. You can put it somewhere else and nothing is going to change.
I don't think so!
Great, let me know how it goes.
As Erik said, the CIRC_ASSEMBLY does not use oxpy, but the oxDNA executable. There are two different things, although they use the same underlying library. |
Describe the bug
Failed to install project when running
make install
in a python venv. Attempted to bypass the problem but ended up with failing tests.To Reproduce
Steps to reproduce the behavior:
mkdir build
cd build
cmake -DPython=ON -DPYTHON_INCLUDE_DIR=/home/user/oxDNA/venv/include/python3.12 -DPYTHON_EXECUTABLE=/home/user/oxDNA/venv/bin/python3.12 ..
make -j4
make install
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
Attempts to fix the bug
Did the following:
advised in: microsoft/vscode-python#14327
Then reran
make install
while in the oxDNA/build directoryResult:
Error message disappeared. But attempts to verify install by running tests (
make test
) lead to the following:In oat test:
error message displayed in terminal when testing duplex_finder
Tests for level 'run':
14/14
Tests for 'quick':
12/12
oxpy tests:
0/2
final output in the terminal:
CRITICAL: Not all tests have passed successfully
[100%] Built target test_oxpy
[100%] Built target test
Expected behavior
Installation completes and all relevant tests pass
Desktop (please complete the following information):
Additional Information
Running
make install
after attempting to fix the bug had some curious output in the terminal.Summary:
oat and oxpy were found in the user/ .local/lib/python3.12/site-packages (likely a result from attempting to fix the bug from previous attempts). Oat and oxpy is detected to be outside the venv set up within the oxDNA directory. Was advised to
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location
from the terminal. Final line output is:Successfully installed oxDNA_analysis_tools-2.3.5 oxpy-3.6.2.dev31+g00504924.d20240716
The text was updated successfully, but these errors were encountered: