[PYTHON] Anaconda3 × Pycharm environment construction memo

Python de amateur built the environment with Anaconda3 and Pycharm. I will leave it as a memorandum.

◆ Environment
◆ Flow of environment construction

First, install Anaconda and Pycharm Community. Conducted by referring to the here page. Execution is completed up to Hello World without any trouble.

python


ModuleNotFoundError: No module named 'openpyxl'

In the execution environment, openpyxl is already installed, and if you import openpyxl from the command prompt, you can execute it without any problem.

・ Cause In the execution environment used in Pycharm (strictly speaking, an Excel processing project created on Pycharm), openpyxl was not installed (in Pycharm (or Python?), Each project has a virtual execution environment individually. You can have it. You can reuse one virtual execution environment).

・ Countermeasures Solved by creating a virtual environment with Anaconda Navigator and installing openpyxl there. image.png

・ Countermeasures (detailed procedure)

  1. Launch Anaconda Navigator
  2. Click Create ("+" button)
  3. Select NaturalLanguage01 for "Name" and Python3.8 for "Packages" and click "Create" image.png
  4. Select "All" in the drop-down list and enter "anaconda" in the search box image.png
  5. Check "anaconda" and click "apply"

It looks like it should be a countermeasure ... w

The above procedure creates a virtual execution environment for Anaconda with "openpyxl" installed (as a result). You will need the path of the virtual execution environment created here later.

Next, in Pycharm, add an interpreter that specifies this execution environment.

  1. Start Pycharm and open "File"-> "Settings"-> any project (this time "Project: sampleOpenPyExcel")-> "Python Interpreter"
  2. Click the gear icon at the top right of the screen → "Add" image.png
  3. Click "System Interpreter" → Click "..." at the top right of the screen
  4. Find and select "Python.exe" directly under the virtual execution environment created by Anaconda, and click "OK". image.png
  5. Close the "Settings" window and click "run" → "Edit Configrations"
  6. Select the program file to which you want to apply the environment, select "Environment"-> "Python Interpreter", select the virtual execution environment you added earlier, and click "OK". image.png

This completes the settings. It was also possible to import the library.

Recommended Posts

Anaconda3 × Pycharm environment construction memo
Anaconda environment construction memo
Python + Anaconda + Pycharm environment construction
ConoHa environment construction memo
BigGorilla environment construction memo
Django development environment construction memo
Anaconda3 python environment construction procedure
[MEMO] [Development environment construction] Python
[MEMO] [Development environment construction] wine
Pycharm memo
Python environment construction memo on Windows 10
Anaconda python environment construction on Windows 10
Anaconda environment construction on Mac (2018 version)
Python environment construction memo on Mac
Python environment construction (pyenv, anaconda, tensorflow)
Star Cluster environment construction work memo
Environment construction memo of pyenv + conda
[MEMO] [Development environment construction] Jupyter Notebook
Emacs Python development environment construction memo
Ubuntu Desktop 20.04 development environment construction memo
Python3.6 environment construction (using Win environment Anaconda)
Django environment construction
Python (anaconda) development environment construction procedure (SpringToolsSuites) _2020.4
DeepIE3D environment construction
Emacs-based environment construction
Python environment construction
Vue.js + Flask environment construction memorandum ~ with Anaconda3 ~
Environment construction (python)
django environment construction
CodeIgniter environment construction
python environment construction
Python --Environment construction
Python environment construction
Mac OS X development environment construction memo
OpenLDAP construction memo
A memo packed with RADEX environment construction
Golang environment construction
python environment construction
Word2vec environment construction
For beginners to build an Anaconda environment. (Memo)
MacOS 10.11 environment construction: Powerline with Anaconda and Dein.vim
Python environment construction (Anaconda + VSCode) @ Windows10 [January 2020 version]
[0] TensorFlow-GPU environment construction built with Anaconda on Ubuntu
[Memo] Build a virtual environment with Pyenv + anaconda
From Python environment construction to virtual environment construction with anaconda
My python environment memo
Environment construction: GCP + Docker
Django project environment construction
python windows environment construction
Go language environment construction
Introducing Django ~ Anaconda + Pycharm ~
homebrew python environment construction
PyData related environment construction
Anaconda-4.2.0-python3 environment construction (Mac)
Python development environment construction
YOLO v4 environment construction ①
pyenv + fish environment construction
python2.7 development environment construction
grip environment construction onCentOS6.5
Anaconda3 environment installation procedure
Golang environment construction [goenv]