If you install a package other than Janome, the basic procedure is the same, so please read the "Janome" part.
Also, this article introduces the installation method for Windows, but it is almost the same for Mac, so please refer to it.
You can build a virtual environment with the following command. This time, the Python version is 3.7 and the environment name is "new_env", but change it if necessary.
command
$ conda create -n new_env python=3.7
Let's check if it was built. You can check the list of virtual environments with the following command.
command
$ conda info -e
Execution result
# conda environments:
#
base * C:(abridgement)
new_env C:(abridgement)
In addition to the default environment called "base", there is an environment called "new_env". If it looks like this, it is a success. (Currently, base is enabled instead of new_env, so * [asterisk] is added to the base line.)
This time, the name of the virtual environment is "new_env", so you can enable it with the following command.
command
$ conda activate new_env
If the beginning of the line of the terminal changes from (base) to (new_env), it is successful.
By the way, if you want to disable the virtual environment (return from new_env to base), execute conda deactivate new_env
.
Now, run the following command to see if Janome is provided.
command
$ conda search janome
Execution result (part)
…
PackagesNotFoundError: The following packages are not available from current channels:
…
As of 2020/10, it does not seem to be provided.
I have no choice but to use pip
.
command
$ pip install janome
Let's display the list of installed packages and check if Janome has been installed.
command
conda list
Execution result
# packages in environment at C:(abridgement):
#
# Name Version Build Channel
ca-certificates 2020.10.14 0
certifi 2020.6.20 pyhd3eb1b0_3
janome 0.4.1 pypi_0 pypi
openssl 1.1.1h he774522_0
pip 20.2.4 py37_0
python 3.7.9 h60c2a47_0
setuptools 50.3.0 py37h9490d1a_1
sqlite 3.33.0 h2a8f88b_0
vc 14.1 h0510ff6_4
vs2015_runtime 14.16.27012 hf0eaf9b_3
wheel 0.35.1 py_0
wincertstore 0.2 py37_0
zlib 1.2.11 h62dcd97_4
You have janome properly! If you run ʻimport janome` on Python and you don't get any errors, you're done!
Recommended Posts