Skip to content
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

Link error: Error: post-link failed for: conda-forge::jupyter_nbextensions_configurator-0.2.3-py27_0 #828

Closed
yunyundong opened this issue Jan 4, 2017 · 19 comments

Comments

@yunyundong
Copy link

yunyundong commented Jan 4, 2017

I want to install nbextensions for jupyte notebook, I used the command

conda install -c conda-forge jupyter_contrib_nbextensions

but it failed. there was a message:

LinkError: Link error: Error: post-link failed for: conda-forge::jupyter_nbextensions_configurator-0.2.3-py27_0

besieds, I used pip to install:

pip install https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
jupyter contrib nbextension install --system

in the process of install, there is no error messages. but after i restart the jupyte server, there is a 'nbextension' tab ,but it is empty, no extensions to be enabled. how can i do? by the way ,my anconada version is 4.2

by the way ,how can I uninstall the nbextensions clean? including remove the install packages.
Thanks in advance.

@jcb91
Copy link
Member

jcb91 commented Jan 4, 2017

there is a 'nbextension' tab ,but it is empty

Yes, this is provided not by this repo directly, but by the jupyter_nbextensions_configurator package, which gets installed as a dependency. Using pip uninstall <package> doesn't remove packages installed as dependencies of <package> (see this SO answer).

Therefore, to remove things completely, you'll have to do a little more work, and uninstall each of the dependencies which you no longer require. You could use the pip-autoremove package, or use a list of the dependencies as of today. However, you probably want to keep some of the dependencies, as they'll be required by the notebook itself.

I'd recommend

pip uninstall jupyter-contrib-core jupyter-highlight-selected-word jupyter-latex-envs jupyter-nbextensions-configurator psutil

To begin with

@tarokiritani
Copy link

tarokiritani commented Jan 11, 2017

I have got a similar error when installing this repo.

I did
conda install jupyter_contrib_nbextensions -c conda-forge

and got this error:
LinkError: Link error: Error: post-link failed for : conda-forge::jupyter_latex_envs-1.3.6-py35_0

I made a new conda environement from scratch, and the repo installed without any issue.

@tt293
Copy link

tt293 commented Jan 12, 2017

Facing the same issue as @tarokiritani, but on a py27 conda 4.2.13 environment.

@jcb91
Copy link
Member

jcb91 commented Jan 13, 2017

So, something's clearly going wrong with our conda packaging/linking scripts, but I'm not yet sure what. The reason for the specific failure should be logged in the conda's .messages.txt file, which should be in <conda_root>/envs/<env_name>/.messages.txt, where <conda_root> is the root conda installation directory (normally ~/miniconda, ~/miniconda3, ~/anaconda, ~/anaconda3 or similar), and <env_name> is the name of the conda env in which you attempted the install. If you could post the contents for that log file immediately after attempting the install, that'd be potentially really helpful. Thanks in advance :)

@jcb91
Copy link
Member

jcb91 commented Jan 13, 2017

Also, which OS everyone is using might be relevant, and whether you see any nbextensions tab...

@jfbercher
Copy link
Member

@tarokiritani @tt293
I can't reproduce with a fresh install of Anaconda on windows. I installed the nbextensions, it worked, then uninstalled, installed jupyter_nbextensions_configurator and jupyter_latex_envs, then the nbextensions and it also worked. So indeed, this seems to be something specific in your installation. Try to follow @jcb91 suggestions in order to try to isolate the reason.

@jcb91
Copy link
Member

jcb91 commented Jan 13, 2017

My best guess is it's related to either permissions, or symlinks 😉

@tarokiritani
Copy link

I use Windows 8.1 Enterprise. This installation error happened in one env, but in another, the installation went well.

Here is the content of .messages.txt after failed installation.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\kiritani\AppData\Local\Continuum\Anaconda3\envs\whisk_project2\lib\site-packages\notebook\nbextensions.py", line 225, in install_nbextension_python
    m, nbexts = _get_nbextension_metadata(module)
  File "C:\Users\kiritani\AppData\Local\Continuum\Anaconda3\envs\whisk_project2\lib\site-packages\notebook\nbextensions.py", line 1140, in _get_nbextension_metadata
    m = import_item(module)
  File "C:\Users\kiritani\AppData\Local\Continuum\Anaconda3\envs\whisk_project2\lib\site-packages\traitlets\utils\importstring.py", line 39, in import_item
    return __import__(parts[0])
  File "C:\Users\kiritani\AppData\Local\Continuum\Anaconda3\envs\whisk_project2\lib\site-packages\latex_envs\__init__.py", line 5, in <module>
    from . import latex_envs
  File "C:\Users\kiritani\AppData\Local\Continuum\Anaconda3\envs\whisk_project2\lib\site-packages\latex_envs\latex_envs.py", line 312, in <module>
    class LenvsLatexExporter(LatexExporter):
  File "C:\Users\kiritani\AppData\Local\Continuum\Anaconda3\envs\whisk_project2\lib\site-packages\latex_envs\latex_envs.py", line 318, in LenvsLatexExporter
    help="Remove headers and footers").tag(config=True)
AttributeError: 'Bool' object has no attribute 'tag'

@jcb91
Copy link
Member

jcb91 commented Jan 14, 2017

Aha! Thanks @tarokiritani for that. I would not have guessed, but it seems that the latex_envs failure may be down to a traitlets version incompatibility. The tag API was introduced with traitlets 4.1, but the conda recipe doesn't actually specify a version (my fault!), so if you were to attempt to install into a pre-existing env which has traitlets 4.0, it wouldn't get upgraded, and you'd see this problem. Could you let me know the output of the following python command from the env which worked, along with the one which didn't, please?

from traitlets import version_info; print(version_info)

@jcb91
Copy link
Member

jcb91 commented Jan 14, 2017

I don't think that this is the exact source of the similar problem experienced by @yunyundong with the configurator though, since it doesn't use the tag API

@tarokiritani
Copy link

In the env where installation succeeded, the output was (4, 3, 1). In the other env, the result was (4, 0, 0).

@jfbercher
Copy link
Member

So, It seems that @jcb91's diagnostic is correct. traitlets version >= 4.1 is needed for the installation to succeed. Just try to upgrade here with something like conda install -f traitlets or pip install traitlets --upgrade; On our side, we will have to explicitly include the requirement.

@jcb91
Copy link
Member

jcb91 commented Jan 14, 2017

as @jfbercher suggests, to fix this for now, you just need to upgrade traitlets (in future we'll update the recipe to get the correct version in the first place without further effort). I'd suggest using

conda update traitlets

from the non-compatible env, to get the latest version compatible with all your other packages.

@tarokiritani
Copy link

The installation worked fine after updating traitlets. Thanks for your quick support!

@jcb91
Copy link
Member

jcb91 commented Feb 5, 2017

@yunyundong @tt293 does updating traitlets resolve this for you, or is this still a problem? I've now fixed the jupyter_latex_envs recipe (see conda-forge/jupyter_latex_envs-feedstock#4) to require the correct traitlets version...

@jcb91
Copy link
Member

jcb91 commented Mar 17, 2017

Ok, I'm going to close this as the jupyter_latex_envs recipe was fixed in conda-forge/jupyter_latex_envs-feedstock#4. However, if @yunyundong or @tt293 (or anyone else) finds that the configurator post-link is still failing, please open a new issue at the configurator repo (https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator). Hope that makes sense!

@jcb91 jcb91 closed this as completed Mar 17, 2017
@ghost
Copy link

ghost commented Jul 21, 2017

I am seeing this on the main installation conda install -f -c conda-forge jupyterlab. I am fairly new to conda and python but not so new to programming to know that this error message is awful:


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    jupyterlab-0.25.2          |           py36_0         3.2 MB  conda-forge

The following NEW packages will be INSTALLED:

    jupyterlab: 0.25.2-py36_0 conda-forge

Proceed ([y]/n)? y

Pruning fetched packages from the cache ...
Fetching packages ...
jupyterlab-0.2 100% |###############################| Time: 0:00:01   3.11 MB/s
Extracting packages ...
[      COMPLETE      ]|##################################################| 100%
Linking packages ...
[jupyterlab          ]|                                                  |   0%

LinkError: Link error: Error: post-link failed for: conda-forge::jupyterlab-0.25.2-py36_0

Ok... What exactly was the error then? I don't understand why installers that go wrong don't just automatically show a verbose option.

@juhasch
Copy link
Member

juhasch commented Jul 22, 2017

You can try to add -v (up to three times) to your conda install command. This should give you more information. See conda install -h.

@ghost
Copy link

ghost commented Jul 23, 2017

I eventually reinstalled conda and then installed pkg-config and jupyter lab individually. conda install jupyterlab never worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants