jupyter-notebook

Packages from Conda env not found in Jupyer Notebook

家住魔仙堡 提交于 2019-12-18 02:42:29
问题 I created an environment called imagescraper and installed pip with it. I then proceed to use pip to install a package called ImageScraper; >>activate imagescraper [imagescraper]>>pip install ImageScraper Just to ensure that I have the package successfully installed: >>conda list [imagescraper] C:\Users\John>conda list # packages in environment at C:\Anaconda2\envs\imagescrap # future 0.15.2 <pip> imagescraper 2.0.7 <pip> lxml 3.6.0 <pip> numpy 1.11.0 <pip> pandas 0.18.0 <pip> pip 8.1.1 py27

Resize the image in jupyter notebook using markdown

假如想象 提交于 2019-12-17 22:38:31
问题 I want to add the image in the Jupyter notebook and I want to have particular height and width. When I try to add the image using ![](img.png) the code is adding the complete image but as per the image dimension and I don't have control over it. I try to use ![](img.png =200x100) but then the image does not appear. Does anybody know of a way to add an image with pre-specified dimensions? 回答1: You can use html directly <img src="image.JPG" alt="Drawing" style="width: 200px;"/> 回答2: Image

How to pretty print in ipython notebook via sympy?

主宰稳场 提交于 2019-12-17 22:25:54
问题 I tried pprint , print , the former only prints Unicode version, and the latter doesn't do pretty prints. from sympy import symbols, Function import sympy.functions as sym from sympy import init_printing init_printing(use_latex=True) from sympy import pprint from sympy import Symbol x = Symbol('x') # If a cell contains only the following, it will render perfectly. (pi + x)**2 # However I would like to control what to print in a function, # so that multiple expressions can be printed from a

How to clean iPython environment so I can start over with Jupyter and Python 3.x?

半世苍凉 提交于 2019-12-17 19:55:40
问题 Over the past couple years I've pip installed lots of things without knowing what I was doing. All of a sudden, I am getting this error when I run a snippet in a Python 2.7 Jupyter Notebook: ImportError: No module named matplotlib When I run this in Terminal: which -a python python 3... I get: Sams-MacBook-Pro-2:~ sambrand$ which -a python python3 //anaconda/bin/python /usr/local/bin/python /usr/bin/python /usr/local/bin/python I think this is showing that I have Python in a few places, which

Install Jupyter Notebook on Miniconda

大兔子大兔子 提交于 2019-12-17 17:49:08
问题 I installed Miniconda and I'm trying to use Jupyter Notebook with it but haven't been able to do so. After installing miniconda I ran the jupyter notebook command on my terminal and jupyter wasn't installed. I went ahead and installed it with the conda install jupyter . However, I once again ran jupyter notebook on my terminal and got the following console error: Emilios-MacBook-Pro:documents emilioramirezeguia$ jupyter notebook Traceback (most recent call last): File "/Users

How to embed image or picture in jupyter notebook, either from a local machine or from a web resource?

孤街醉人 提交于 2019-12-17 17:18:17
问题 I would like to include image in a jupyter notebook. If I did the following, it works : from IPython.display import Image Image("img/picture.png") But I would like to include the images in a markdown cell and the following code gives a 404 error : ![title]("img/picture.png") I also tried ![texte]("http://localhost:8888/img/picture.png") But I still get the same error : 404 GET /notebooks/%22/home/user/folder/img/picture.png%22 (127.0.0.1) 2.74ms referer=http://localhost:8888/notebooks

Jupyter notebook kernel not connecting

ε祈祈猫儿з 提交于 2019-12-17 16:57:08
问题 I have previously used Jupyter Notebook (python 2 and 3) on my mac. After not using it for a while, there seems to be a problem I am unable to fix. When starting the notebook from terminal using the command Jupyter notebook , and then select a notebook I want to work with, I get the error: "A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration." I am positive this has nothing

Jupyter notebook display two pandas tables side by side

放肆的年华 提交于 2019-12-17 15:04:59
问题 I have two pandas dataframes and I would like to display them in Jupyter notebook. Doing something like: display(df1) display(df2) Shows them one below another: I would like to have a second dataframe on the right of the first one. There is a similar question, but it looks like there a person is satisfied either with merging them in one dataframe of showing the difference between them. This will not work for me. In my case dataframes can represent completely different (non-comparable elements

convert json ipython notebook(.ipynb) to .py file

若如初见. 提交于 2019-12-17 10:25:41
问题 How do you convert an IPython notebook file (json with .ipynb extension) into a regular .py module? 回答1: From the notebook menu you can save the file directly as a python script. Go to the 'File' option of the menu, then select 'Download as' and there you would see a 'Python (.py)' option. Another option would be to use nbconvert from the command line: jupyter nbconvert --to script 'my-notebook.ipynb' Have a look here. 回答2: According to https://ipython.org/ipython-doc/3/notebook/nbconvert

Passing command line arguments to argv in jupyter/ipython notebook

让人想犯罪 __ 提交于 2019-12-17 06:37:32
问题 I'm wondering if it's possible to populate sys.argv (or some other structure) with command line arguments in a jupyter/ipython notebook, similar to how it's done through a python script. For instance, if I were to run a python script as follows: python test.py False Then sys.argv would contain the argument False . But if I run a jupyter notebook in a similar manner: jupyter notebook test.ipynb False Then the command line argument gets lost. Is there any way to access this argument from within