takluyver / cite2c

Citations in the Jupyter Notebook
MIT License
317 stars 36 forks source link

install problem #23

Open tallishpaul opened 8 years ago

tallishpaul commented 8 years ago

Hi,

Sorry but I am new to github, python etc, hope I don't annoy anyone too much. I am trying to install cite2c using jupyer notebook on sagemathcloud. In my ignorance: 1) I copied all the cite2c files, folders into a seperate empty folder 2) .gitignore wouldn't copy over for some reason, so I carried on anyway 3) whilst in this new folder I typed python install.py into a box which said 'terminal command' and hit the 'play' button 4) the 'terminal command' box output the following:

Traceback (most recent call last): File "install.py", line 3, in from IPython.html.nbextensions import install_nbextension ImportError: No module named html.nbextensions

I am running Windows 7 in case that has anything to do with it (can't see how as it is in the cloud). From this description it'll be clear I don't know much.

I attach a screenshot in case it helps. screenshot_install_fail

Is the problem that I am using sagemathcloud instead of installing Jupyter locally?

Any chance of some help or advice? Kind regards, Paul

takluyver commented 8 years ago

You're doing the right thing, I don't know why it wouldn't work. Maybe SMC is on an old version of IPython, although I thought they tended to update quickly. Can you see what the output from this is:

python -c 'import IPython; print(IPython.__version__)'
tallishpaul commented 8 years ago

2.3.0 is the o/p, which confuses me. Once you are viewing a .ipynb it allows you to select the python 3 kernel (so if I open the sample.ipynb it already says Python 3 in the top right hand of the screen-probably because I did that whilst in a different .ipynb earlier in the day)

?

On 9 October 2015 at 16:57, Thomas Kluyver notifications@github.com wrote:

You're doing the right thing, I don't know why it wouldn't work. Maybe SMC is on an old version of IPython, although I thought they tended to update quickly. Can you see what the output from this is:

python -c 'import IPython; print(IPython.version)'

— Reply to this email directly or view it on GitHub https://github.com/takluyver/cite2c/issues/23#issuecomment-146910489.

takluyver commented 8 years ago

It's possible that the copy of IPython that gets imported from the command line is different from the copy the server is using. The kernel-switching features require at least version 3 (this is the IPython version, separate from the Python version numbers).

I suggest you ask in a SMC forum - why is Python at the command line finding an old copy of IPython, and is it possible to install notebook extensions for your own user.

tallishpaul commented 8 years ago

OK, now I know what to ask, I will do that, thanks very much.

On 9 October 2015 at 19:03, Thomas Kluyver notifications@github.com wrote:

It's possible that the copy of IPython that gets imported from the command line is different from the copy the server is using. The kernel-switching features require at least version 3 (this is the IPython version, separate from the Python version numbers).

I suggest you ask in a SMC forum - why is Python at the command line finding an old copy of IPython, and is it possible to install notebook extensions for your own user.

— Reply to this email directly or view it on GitHub https://github.com/takluyver/cite2c/issues/23#issuecomment-146949200.

tallishpaul commented 8 years ago

I contacted SMC about this, posed the questions. They tried to install cite2c system wide and failed.

I also intalled Jupyter locally OK, but not cite2c, I get errors. This seems a bit of a rabbit hole for someone like myself with almost no experience. Command window output says something about My Documents not existing. There might be something odd going on with file locations because it is a uni PC and support have in the past mentioned how these personal folders are not actually on the machine, they are on a uni server somewhere for backup/recovery reasons. If I get to use a standard PC at home I will try again. Until now I will have to do without.

Thanks for your help with this.

Kind regards Paul

On 9 October 2015 at 19:34, Paul Gordon paul@gordons.me.uk wrote:

OK, now I know what to ask, I will do that, thanks very much.

On 9 October 2015 at 19:03, Thomas Kluyver notifications@github.com wrote:

It's possible that the copy of IPython that gets imported from the command line is different from the copy the server is using. The kernel-switching features require at least version 3 (this is the IPython version, separate from the Python version numbers).

I suggest you ask in a SMC forum - why is Python at the command line finding an old copy of IPython, and is it possible to install notebook extensions for your own user.

— Reply to this email directly or view it on GitHub https://github.com/takluyver/cite2c/issues/23#issuecomment-146949200.

takluyver commented 8 years ago

Hmm, sorry about that. If it's convenient to try again locally, can you paste the errors that you get?

The install script does two separate steps in one - it copies the files into place (installing) and sets a config option to load cite2c when you open a notebook (enabling). The enabling step probably can't be done systemwide, as it changes the user's config. With Jupyter, you should be able to do the enabling step separately like this:

jupyter nbextension enable cite2c/main
tallishpaul commented 8 years ago

Hi Thomas,

I've got Jupyter installed locally on a non-Uni PC. Now cite2c has installed, and I have given it my Zotero UserID. That's the good news.

But...when I click the citation button I get the pop up 'start typing to search Zotero', but it doesn't find anything at all. Eek.

I can't think what I am doing wrong. I have setup synching on my Firefox Zotero plugin - I can see my two dummy references there and also in my Zotero.org server library.

I haven't made any changes to Zotero preferences, nor installed additional plugins. Should I have?

I don't have any private keys, is this anything to do with it?

Hoping you can help.

BTW, William Stein has got cite2c installed on SageMathCloud for everyone, sounds promising, but it is also not finding my stuff.

Kind regards, Paul

On 12 October 2015 at 08:51, Thomas Kluyver notifications@github.com wrote:

Hmm, sorry about that. If it's convenient to try again locally, can you paste the errors that you get?

The install script does two separate steps in one - it copies the files into place (installing) and sets a config option to load cite2c when you open a notebook (enabling). The enabling step probably can't be done systemwide, as it changes the user's config. With Jupyter, you should be able to do the enabling step separately like this:

jupyter nbextension enable cite2c/main

— Reply to this email directly or view it on GitHub https://github.com/takluyver/cite2c/issues/23#issuecomment-147317803.

takluyver commented 8 years ago

Hi Paul,

Have you enabled the option on Zotero to make your library public? It's on the privacy page in settings.

Eventually it should be possible to use Oauth to get access to your library without making it public - see issue #9. But that sounds tricky, so for now you need to publish your Zotero library for cite2c to search it.

Best wishes, Thomas

tallishpaul commented 8 years ago

Hi Thomas,

OK, that was the problem. It'd be good for it not to be public though, that might not really matter to me. It's still not quite working on SMC, I got back to William, copied here at the bottom.

I have just realised that I can't get a pdf output from Jupyter (or SMC), which seems to be a general current issue, something you've been helping with. It seems a really important issue, it makes it tricky to communicate with my colleagues who don't use Jupyter.

Thanks for all your help with this.

Kind regards Paul

copy of what happens in SMC presently It's good that the install seems to have worked, but when I use the citation button to choose a reference, it inserts this: when I do what appears to be exactly the same thing on a local Jupyter install I get (I've changed the numbers in case that identifies me on Zotero-such is my ignorance!)

On 14 October 2015 at 14:37, Thomas Kluyver notifications@github.com wrote:

Hi Paul,

Have you enabled the option on Zotero to make your library public? It's on the privacy page in settings https://www.zotero.org/settings/privacy.

Eventually it should be possible to use Oauth to get access to your library without making it public - see issue #9 https://github.com/takluyver/cite2c/issues/9. But that sounds tricky, so for now you need to publish your Zotero library for cite2c to search it.

Best wishes, Thomas

— Reply to this email directly or view it on GitHub https://github.com/takluyver/cite2c/issues/23#issuecomment-148051290.