Python + Anaconda + Pycharm environment construction

Python environment notes

I created an environment that can handle python on a laptop computer a long time ago. By creating a new environment on the desktop this time I wrote an article with the intention of making a note anyway.

Preface

For laptops, anaconda and PyCharm were included, so At that time, I probably asked the internet or my seniors to install it. I don't know what it is, but it's probably that I made that choice I wonder if it's a popular method.

By the way, it's a digression I wanted to draw recently, so I copied and moved the article in the above environment % matplotlib inline I got an error at that point.

I managed to write an IPython Notebook, but it's a hassle Gently erased

What I want to say is, I wonder if it is best to use anaconda and PyCharm together.

It's a hassle, so I'll put the same on my desktop PC.

Until Anaconda installation

Let's put the installer image.png Anaconda

I got the error below. It seems that there was a space in the file name. I decided to put it directly under C based on the information on the net. image.png

I got something like this. You can cancel it once, create a file, and then start the installer again without any problem. image.png

I did a lot of research, but I'm not sure, so I installed it as default. (I thought about it later, but it was my first time to put it in this computer, so I may have checked both of them.) image.png

I got this screen. After all it seems that it is better to put PyCharm (passionate) image.png

This is unchecked and finished. image.png

Anaconda navigator I will uncheck here because it is excellent image.png I didn't do anything else. I don't think it's necessary to put such various packages in a virtual environment, but ... I'm a beginner so I don't know. .. ..

PyCharm Let's also include PyCharm. Let's go to the community, not the Professional version. PyCharm

I'm not sure, but I gently added only the extension. image.png

what is this? (I'm not sure, so I'll just go) image.png

If you get here, it's a screen you know, so let's move it around.

First, hello world worked.

Let's copy and move the one that contains numpy that I made a long time ago.

I got an error when I tried to move it without doing anything.

Traceback (most recent call last):
  File "C:/〇〇〇/test01.py", line 1, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

After all Go to settings → project Interpreter At show all, I selected Python 3.7, which includes Anaconda, and it worked. It said Conda Enviroment. There were virtualenv, system, pip, etc., but it's already working, so I'll do it again if necessary.

↓ The guy I made as a trial. If you put your favorite function in func, it will make a dot. (Because it starts from for sentence 0, it is a secret that I gently added +1)

test03.py


import numpy as np
import matplotlib.pyplot as plt

n = 100

A = np.ones((n, 1))


def func(x):
    return np.log(x+1) + (np.cos(x))/(x+1)


for i in range(100):
    A[i][0] = func(i)

print(A)

plt.plot(A)
plt.title("n =%i" % n)
plt.xlabel("x")
plt.ylabel("y")
plt.show()

I'm glad I moved around.

image.png

Postscript When I was organizing files, I remembered that I used to put them on my pyhton computer. I don't know if it works according to this article I don't remember if I passed the path or messed with environment variables. .. ..

I also don't know the virtual environment.

Recommended Posts

Python + Anaconda + Pycharm environment construction
Anaconda3 python environment construction procedure
Anaconda3 × Pycharm environment construction memo
Python environment construction
Environment construction (python)
python environment construction
Python --Environment construction
Python environment construction
python environment construction
Anaconda python environment construction on Windows 10
Python environment construction (pyenv, anaconda, tensorflow)
Python3.6 environment construction (using Win environment Anaconda)
Python (anaconda) development environment construction procedure (SpringToolsSuites) _2020.4
python windows environment construction
homebrew python environment construction
Python development environment construction
python2.7 development environment construction
Anaconda environment construction memo
Mac environment construction Python
Python environment construction @ Win7
Python environment construction (Anaconda + VSCode) @ Windows10 [January 2020 version]
Building a Python environment with WLS2 + Anaconda + PyCharm
From Python environment construction to virtual environment construction with anaconda
Install Python environment with Anaconda
Anaconda environment construction on CentOS7
Python environment construction (Windows10 + Emacs)
CI environment construction ~ Python edition ~
Python environment construction For Mac
Python3 environment construction (for beginners)
Python environment construction and TensorFlow
Python environment construction under Windows7 environment
[MEMO] [Development environment construction] Python
Environment construction of python2 & 3 (OSX)
[Python] Django environment construction (pyenv + pyenv-virtualenv + Anaconda) for macOS
Environment construction of python and opencv
Python environment construction memo on Windows 10
Get started with Python! ~ ① Environment construction ~
Python + Unity Reinforcement learning environment construction
Anaconda environment construction on Mac (2018 version)
Install scrapy in python anaconda environment
I checked Mac Python environment construction
Python environment construction memo on Mac
[Python3] Development environment construction << Windows edition >>
install tensorflow in anaconda + python3.5 environment
Python development environment construction on macOS
Python environment construction (pyenv + poetry + pipx)
Environment construction of python3.8 on mac
Python3 environment construction with pyenv-virtualenv (CentOS 7.3)
Python3 TensorFlow for Mac environment construction
Emacs Python development environment construction memo
pytorch @ python3.8 environment construction with pipenv
[docker] python3.5 + numpy + matplotlib environment construction
OpenCV3 & Python3 environment construction on Ubuntu
Python environment construction on Mac (pyenv, virtualenv, anaconda, ipython notebook)
[Python] Anaconda environment construction (installation, startup, virtual environment, package management) Mac environment
Django environment construction
[Ubuntu 18.04] Python environment construction with pyenv + pipenv
[Python] Building an environment with Anaconda [Mac]
Python 3.3 in Anaconda
Change Python 64bit environment to 32bit environment with Anaconda
DeepIE3D environment construction