{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Getting started" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1. Confirm a virtual environment\n", "***\n", "\n", "Confirm that the operating PC has the recommended environment(vjem) to run PyJEM. \n", "\n", "### 1.1 Verify that Miniconda is already installed.\n", " \n", " `> conda`\n", " \n", "**If the command raise error, please jump the [Install Miniconda](../../Appendix/Installer.html#Install-Miniconda).**\n", "\n", "### 1.2 Verify that vjem is already installed.\n", "\n", " `> conda env list`\n", "\n", "**If the command raise error or not exist vjem, please jump the [Create vjem](../../Appendix/Installer.html#Create-vjem).**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2. Activate vjem environment\n", "***\n", "\n", "Activate the vjem on command line.\n", "```\n", "conda activate ***\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example\n", "\n", "Activate python3.8 environment.\n", "\n", "```python\n", "(base) C:\\Users\\JEOL\\Desktop>conda activate vjem38\n", "(vjem38) C:\\Users\\JEOL\\Desktop>python\n", "Python 3.8.10 | packaged by conda-forge | (default, May 12 2017, 16:16:49) [MSC v.1900 64 bit (AMD64)] on win32\n", "Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n", ">>>\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 3. Import the PyJEM library\n", "***\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Execute the following command on the command line.\n", "```python\n", ">>> import PyJEM\n", "```\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "**If output the following error on import, please jump the [Install PyJEM](../../Appendix/Installer.html#Install-PyJEM).**\n", "```python\n", ">>> import PyJEM\n", "Traceback (most recent call last):\n", " File \"\", line 1, in \n", "ModuleNotFoundError: No module named 'PyJEM'\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 4. Confirm the communication.\n", "***\n", "\n", "### 4.1 TEM3 package \n", "\n", "```python\n", ">>> from PyJEM import TEM3\n", ">>> TEM3.connect()\n", "True\n", "```\n", "\n", "If the result of the execution is True, it is successful. **but if the result is False, please confirm the following.**\n", "\n", "- TEMExternal is installed the operating PC.\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4.2 Other package\n", "\n", "```python\n", ">>> from PyJEM import detector\n", ">>> detector.get_attached_detector()\n", "[\"HAADF\"]\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If the result of the execution is \n", "\n", "```ConnectionRefusedError: [WinError 10061]```\n", "\n", "Probably because the IPaddress in the package configuration is not corrected. please try the [Change IP address](/More%20customize.html#Change-IP-address)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, "nbformat_minor": 1 }