-
Notifications
You must be signed in to change notification settings - Fork 176
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 in running "test_presto_python" #162
Comments
Sorry for the delay. This is because the python portion of PRESTO is not installed correctly, or that you are using a different python than the one where you installed PRESTO. Did you install PRESTO from scratch? If so, what is your OS? Also, please do the following:
It should end by saying:
|
Hi,
|
Did you install everything as administrator? Can you check to see that the presto python modules are installed somewhere in your (as a user, not as administrator) PYTHONPATH? (not necessarily based on the environment variable, but based on where python looks for packages?). Also, make sure that the |
I installed all my softwares as administrator (the only account on my Ubuntu20.04). And I put the presto python path into the environment variables |
Just to confirm here, @scottransom , I am also running into this issue on Link. I have everything installed just fine with the C scripts, but all of the Python scripts break with this importing of I will note that the init.py are all empty and there doesn't look to be .py scripts inside the directories aside from the main one. I am quite confused on what the setup.py script actually does or if there is a make command that we are missing in the install instructions? ~ Joe G. |
@Jiaying-Xu-Zhejiang Did the PRESTO python code actually get installed into that PYTHONPATH directory? Note that you should not need to use PYTHONPATH at all, anymore, and I would recommend unsetting that variable. If you want to install the python modules in your user directory, you should do "pip install --user ." when you install. And note that |
@JPGlaser Similar to my last comment, how exactly did you run the |
Note you can also get more information on the install (including were things are installed and where it is finding dependencies) by doing
You should see something very similar unless the compilation of the C-code python wrappers failed, which |
Note that there should also be 3 shared library files located in the top-level
Those come from the C-wrappers for the various libraries that PRESTO uses. |
So we are not using
Said ~ Joe G. |
Just a note, when installing via
It looks like it is trying to use things from the
~ Joe G. |
Just making sure, @JPGlaser ... You don't have PYTHONPATH set, do you? I use conda on my nimrod cluster using this same exact install methodology (including into a "global" conda environment that all of my students etc use). That install log certainly looks like things installed correctly. But a PYTHONPATH can certainly screw that up. |
I used to require that PYTHONPATH contain $PRESTO/python, but that is bad now and will lead to exactly what you see above. |
I am using a condo environment and had the same error with
i am using python3.7 and I just git cloned presto so I assume it is the latest version 4.0. any idea why it can't find |
I assume that in that conda environment you did |
Hi There,
Following error comes up whenever I run " test_presto_python". I couldnt figure out what the problem is. I'm newbie to presto. Thanks
**adeel@adeel-HP-Pavilion-x360-Convertible-14-dh1xxx:~/pulsar_software/presto/tests$ python3 test_presto_python.py
Traceback (most recent call last):
File "/home/adeel/pulsar_software/presto/tests/test_presto_python.py", line 4, in
from presto import presto
ImportError: cannot import name 'presto' from 'presto' (/home/adeel/.local/lib/python3.8/site-packages/presto/init.py)
The text was updated successfully, but these errors were encountered: