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
ImportError: No module named sagenb on openSUSE #10176
Comments
comment:1
Hi there, Actually I had the same error with a openSuSE 11.1 (64 bits if it maters). |
comment:3
Replying to @hivert:
So we can exclude the possibility of a broken I really would try just adding (If one changes that, one could of course also add some debug code to see if and how the |
comment:4
The attached patch to the SageNB spkg adds Florent, please (apply,) build, test and report! ;-) (I have no idea if that solves the problem, therefore a temporary patch and "needs info". At least we should hopefully be able to track this further down.) To apply the patch, extract the original SageNB package (best from a Sage shell, since we need a suitable Python installation), cd to |
comment:5
Just to let you now: test in progress... |
comment:6
The compilation of sage is not yet finished but from install.log
|
comment:7
Replying to @hivert:
Hmmm, so something else goes wrong (i.e. there's no sagenb path listed there at all, unless my grep failed for some reason...) Btw, it should have been sufficient to just install the patched spkg. Can you take a look at / post your Maybe we have a race condition in editing that? (You could retry with |
comment:8
Just for the record, I got: ...
Searching for setuptools==0.6c9
Best match: setuptools 0.6c9
Processing setuptools-0.6c9-py2.6.egg
setuptools 0.6c9 is already the active version in easy-install.pth
Installing easy_install script to /home/leif/Sage/sage-4.6.rc0-short-logs/local/bin
Installing easy_install-2.6 script to /home/leif/Sage/sage-4.6.rc0-short-logs/local/bin
Using /home/leif/Sage/sage-4.6.rc0-short-logs/local/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg
Finished processing dependencies for sagenb==0.8.7-patched
Old path: "/home/leif/Sage/sage-4.6.rc0-short-logs/devel/sagenb-main"
New path: "../../../../devel/sagenb"
real 0m8.624s
user 0m5.800s
sys 0m2.570s
Successfully installed sagenb-0.8.7-patched
Now cleaning up tmp files.
Making Sage/Python scripts relocatable...
Making script relocatable
Finished installing sagenb-0.8.7-patched.spkg |
comment:9
Replying to @nexttime:
Could you also take a look at |
comment:10
To brute-force-fix your problem without knowing the real cause, we could just add: # Dave says Solaris' non-POSIX grep in the default path
# doesn't understand "-q" (which *is* POSIX):
if ! grep sagenb easy-install.pth >/dev/null; then
echo 'No sagenb path found in easy-install.pth!'
echo "Adding relative sagenb path to easy-install.pth"
# Anyone recalling the correct syntax for *sed*?
ed easy-install.pth >/dev/null <<EOF
$i
../../../../devel/sagenb
.
wq
EOF
fi Opinions? |
comment:11
Ok, the sed -e '$ i \../../../../devel/sagenb' easy-install.pth > easy-install.$$
mv -f easy-install.$$ easy-install.pth |
comment:12
Looks reasonable. It has been touched at the end of the build. I tried a
I'm not sure what to do... If you have some time, maybe it could be easier to discuss on irc. I'm kind of busy tonight (it is 20:4 here) but I probably can find 1/2h if you need. I've no idea how this |
comment:13
So the modification time did not change when running I'm not familiar with setuptools, easy-install etc. either... :( I could perhaps upload a modified patch including the "brute force" fix later, but am busy now, too. Dave just said he's going to install OpenSuSE 11.3 and / or 11.2 in a virtual machine; perhaps he can help, too, with debugging that. |
comment:14
Replying to @nexttime:
On the contrary it did change as expected.
Ok !
|
comment:15
A last question for the moment: How do you get the different paths |
comment:16
Replying to @nexttime:
My install is in |
Attachment: trac_10176-improve_spkg_dists_spkg_install_generation-spkg.patch.gz SageNB spkg patch (0.8.7 -> 0.8.7.p1). Now includes an ugly work-around. |
Attachment: sagenb-0.8.7_vs._0.8.7.p1.diff.gz Cumulative diff between SageNB 0.8.7 and 0.8.7.p1 - for reference / review only. |
Author: Leif Leonhardy |
comment:17
New spkg: http://spkg-upload.googlecode.com/files/sagenb-0.8.7.p1.spkg md5sum: Florent, again: Please install / build, test and report! ;-) This spkg now contains the work-around adding the relative sagenb path to I've also updated the spkg patch, and added a cumulative diff for reference / review (the Mercurial changeset contains two patches), but you can just download and install the new spkg. (I actually made a mistake in the previously attached patch s.t. the I've again tested the spkg (only) on Ubuntu 10.04. $ ./sage -f /path/to/sagenb-0.8.7.p1.spkg
$ ./sage -t -long -sagenb # Though there are no long tests IIRC should be sufficient to test it. (Others should perhaps test it on different platforms as well.) You could then do $ egrep "Adding|Removing" spkg/logs/sagenb-0.8.7.p1.log
$ grep easy-install\.pth spkg/logs/sagenb-0.8.7.p1.log # more matches (also with your previous logs, i.e. |
comment:18
Leif, thanks for making a new spkg with your improvements. From
Perhaps |
comment:59
Replying to @jdemeyer:
;-) Well, since SageNB moved from a more or less typical spkg to something more like the Sage library, I expect more people - potentially less familiar with the SageNB update process - to work on it. So it's now IMHO more likely developers will have a broken (or outdated) Sage in their default path (i.e., outside a Sage subshell), in which case "arbitrary" things could happen. If
|
comment:60
Replying to @jdemeyer:
My Mercurial patch(es) contain a lot of commit messages with notes; the diff was not intended to get merged. Replying to @jdemeyer:
At the moment the whole purpose of the spkg is to aid debugging the problems mentioned on sage-devel; nobody opened a ticket I asked for, or replied on that thread yet. In case the spkg helps, I suggest opening a new ticket with a description of the newly encountered problems, then "clean" Mercurial patches, and with just a back-reference to this ticket since the two patches from here will (most probably) be also included there. [Error] messages given by my current spkg may lead to further work. I can't do that until I get some feedback and know what's really going wrong. Testing upgrading with the current buildbot / scripts seems less useful; cf. sage-release. |
comment:62
Replying to @nexttime:
I know :-) I just prefer qpushing a |
comment:63
Leif, as far as I can tell, your patch fixes the issue. Could it be? |
comment:64
Replying to @jdemeyer:
Well, besides other things it removes the |
comment:65
Replying to @nexttime:
True, but I can't reproduce this problem anymore with sage 4.6.1.rc0 (not officially released). |
comment:66
I have (finally) created ticket #10494 for the upgrade issue. |
comment:67
Patch copied to #10494. |
comment:72
Is this still an issue? |
Changed author from Leif Leonhardy to none |
Reviewer: Leif Leonhardy |
Florent Hivert reports on sage-release that Sage refuses to start after building 4.6.rc0 from scratch on openSUSE 11.3:
According to the thread, the problem seems to be that installing the sagenb package does not yield an
SAGE_ROOT/local/lib/python/site-packages/easy-install.pth
that contains any path to the Sage Notebook files.
This is a possible follow-up to #10097, which is supposed to replace the line
./sagenb-0.8.2-py2.6.egg
--- inserted by setuptools intoeasy-install.pth
--- with../../../../devel/sagenb
.CC: @hivert @jasongrout @sagetrac-drkirkby @TimDumol @jdemeyer
Component: notebook
Reviewer: Leif Leonhardy
Issue created by migration from https://trac.sagemath.org/ticket/10176
The text was updated successfully, but these errors were encountered: