Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    sitalk
    @sitalk
    Hello everyone.
    Does anybody know if there is a way to get the cell tag (from the cell metadata) by using IPython ?
    Thanks in advance
    Jeff Zhang
    @zjffdu
    Hi everyone, where can I find the display protocol of jupyter notebook. especially on how jupyter update the cell output in streaming scenario. Thanks
    Min RK
    @minrk
    @zjffdu that's defined in the jupyter messaging protocol
    tbitowt
    @tbitowt
    Hello, I have a question regarding Pycharm integration. Are you able to get IPython completion in PyCharm IDE?
    I mean, I wrote my own completer by @complete_object, and it's not completing (even in PyCharm console)
    shaik sumiya
    @shaiksumiya_gitlab
    i have installed anaconda3.7.6 version but i am unable to access jupyter notebook. its showing permission to port denied. can u please help me
    Sidafa Conde
    @sconde
    @shaiksumiya_gitlab post the error
    Carlos del Cacho Vicente
    @delcacho
    hello, one quick question. How can I run some R lines at startup in IRKernel to customize the kernel for my users? In the Python kernel, I can pass a --config parameter with my extra options, but this does not seem to be available for R.
    Pinkmei
    @Pinkmei
    Dear Jupyter Experts, I installed statsmodels using pip with satisfaction in python. I have been trying to install statsmodels in Jupyter Notebook to run, however got ModuleNotFoundError. Can anyone help please? thank you.

    ModuleNotFoundError Traceback (most recent call last)

    <ipython-input-1-085740203b77> in <module>
    ----> 1 import statsmodels.api as sm
    ModuleNotFoundError: No module named 'statsmodels'

    I was puzzled that why statsmodels worked smoothly in python, why can't be found in Jupyter Notebook? Is there any step that I might be missing. Thank you in advance.
    JonB
    @JonB451
    Hi. Does anyone know please how to show which kernel iPython is connected to at the moment?
    Jeff Zhang
    @zjffdu
    Does anyone know what is the mechanism of ipython kernel's KeyboardInterrupt ? I have a backend service which run ipython kernel underneath, and use grpc to communicate with external process. But when I stop the external process, the ipython kernel would raise KeyboardInterrupt. I am very curious how that happens, because I never call any method to trigger KeyboardInterrupt, then how that happens. Could anyone help me ? Thanks
    Min RK
    @minrk
    KeyboardInterrupt is the Python exception raised by the signal handler for SIGINT
    So if "stop the external process" means sending SIGINT, e.g. via ctrl-C, that would happen
    Jeff Zhang
    @zjffdu

    So if "stop the external process" means sending SIGINT, e.g. via ctrl-C, that would happen

    ipython kernel only use rpc to communicate with other processes, and I don't find any method calls to sending SIGINT, is there any other case that will cause SIGINT ?

    Min RK
    @minrk
    The KernelManager sends SIGINT to the kernel process
    The kernel itself only receives SIGINT
    the signal comes from the notebook server or other parent process
    in a notebook example, an HTTP POST from the browser is handled here which sends SIGINT here
    Jeff Zhang
    @zjffdu

    the signal comes from the notebook server or other parent process

    My use case is also notebook, I only trigger interprut via this method, but it is never called when the external process is terminated, this make me curious how the interrupt happens, https://github.com/apache/zeppelin/blob/master/zeppelin-jupyter-interpreter/src/main/resources/grpc/jupyter/kernel_server.py#L144

    Min RK
    @minrk
    how is termination implemented? It may be sending SIGINT as part of the polite request to shut down.
    Thomas Aarholt
    @thomasaarholt
    In qtconsole, notebook and lab (and regular ipython, but I don't know if it was ever there), I am no longer getting autocomplete upon invoking tab after typing something. I have tried installing in a new conda environment and cleaning out anything old that was under jupyter --path. I am otherwise at a loss as to what to try. Does anyone have any suggestions?
    mtesseracted
    @mtesseracted
    When I run it I get the following error:
    Traceback (most recent call last):
      File "/home/al/opt/anaconda3/envs/ece590/bin/psi4", line 287, in <module>
        exec(content)
      File "<string>", line 80, in <module>
    
    NameError: name 'hf_energy' is not defined
    
    Printing out the relevant lines from the Psithon --> Python processed input file:
                    print('WARNING: SCF calculation failed.')
                else:
                    raise
            finally:
    
    -->         molecule.hf_energy = hf_energy
                molecule.nuclear_repulsion = mol.nuclear_repulsion_energy()
                molecule.canonical_orbitals = numpy.asarray(hf_wavefunction.Ca())
                molecule.overlap_integrals = numpy.asarray(hf_wavefunction.S())
                molecule.n_orbitals = molecule.canonical_orbitals.shape[0]
                molecule.n_qubits = 2 * molecule.n_orbitals
    
    /home/al/opt/OpenFermion-Psi4/openfermionpsi4/_run_psi4.py:226: Warning: No calculation saved. Psi4 segmentation fault possible.
      Warning)
    Simon Krughoff
    @SimonKrughoff
    Hi there. I work for a large astronomical project and we are using JupyterLab as the basis for our online analysis environment. Thanks to everybody for the great work to make that ecosystem so successful!
    We recently updated package versions and found what I think is a bug in ipykernel. I opened an issue: ipython/ipykernel#725 and filed a PR: ipython/ipykernel#726. I am attempting to follow the contribution workflow, but I may have missed a step. In any case, it doesn't appear to have been looked at yet and I'm wondering if there is anything further I need to do to help it along.
    Thanks for any advice!
    Thomas Aarholt
    @thomasaarholt
    I'm not a dev there, but I commented on it - it totally looks like someone went a bit fast when writing the original code there, and your fix looks correct.
    Simon Krughoff
    @SimonKrughoff
    Thanks for commenting! Hopefully that will move it along
    Thomas Aarholt
    @thomasaarholt
    Woohoo! That was quick!
    Simon Krughoff
    @SimonKrughoff
    Excellent! Thanks for the assist!
    Thomas Aarholt
    @thomasaarholt
    No worries! Nice catch on that issue!
    Cassiel-girl
    @Cassiel-girl
    When I enter ipython, I enter python code and the result is returned. Which function can realize that the input parameter is Python code and the result of function execution is similar to the result of ipython after executing that python code?
    Cassiel-girl
    @Cassiel-girl
    An ipython backend is running on one machine A. This backend receives commands from a user on another machine B, sends them to A for execution, and then returns the results to B. The program running on the other machine B is a pyqt5 GUI that can type strings, but machine B cannot install anything ipython related. What programming interface should the program on machine A call to implement? Or an example of the relevant code.
    Frédéric Collonval
    @fcollonval
    Hey, I have a question regarding Python built-in breakpoint(). When running in a notebook, the breakpoint() instruction is ignored - but set_trace is working. But in a terminal, breakpoint() will work (but triggers pdb not ipdb). Is there a way to make breakpoint() worked in notebook?
    Screenshot from 2021-11-09 08-15-07.png
    Screenshot from 2021-11-09 08-19-05.png
    Dave Hirschfeld
    @dhirschfeld
    IIUC you can make breakpoint call the set_trace method using sys.breakpointhook
    (Not sure if that will help with the notebook though)
    Thomas Aarholt
    @thomasaarholt
    @fcollonval I don't think you will get breakpoint working in the notebook. Instead, I'd recommend using Jupyter Lab, and using the built-in debugger there: https://jupyterlab.readthedocs.io/en/stable/user/debugger.html
    Frédéric Collonval
    @fcollonval
    Thanks for the pointers and suggestions.
    The hook is pretty cool:
    image.png
    Dave Hirschfeld
    @dhirschfeld
    :rocket:
    Thomas Aarholt
    @thomasaarholt
    Fascinating!
    MatParr
    @MatParr

    Hey guys, can someone break down this error, please? and thanx in advance for your efforts!

    Output from spyder call 'get_cwd':
    python 8.1.1

    the scripts were being called before and functioned perfectly but when i upgraded the packages for spyder I am receiving these error with no output. I have been googling for a suitable breakdown but thus far it's futile.