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.
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.
Let's put the installer 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.
I got something like this. You can cancel it once, create a file, and then start the installer again without any problem.
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.)
I got this screen. After all it seems that it is better to put PyCharm (passionate)
This is unchecked and finished.
Anaconda navigator I will uncheck here because it is excellent 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.
what is this? (I'm not sure, so I'll just go)
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'
↓ 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.
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