When building a python environment, it may be difficult to understand why it is installed with pip or conda, so I will summarize it.
If you want to install line-bot-sdk in Anaconda's virtual environment but not with the conda command, install it with the pip command.
$ pip3 install line-bot-sdk
Even if I check it with the following command, it is not in the virtual environment of Anaconda.
$ conda list
In my case the result of'pip3 install line-bot-sdk'
$ /Users/username/.pyenv/versions/3.6.5/lib/python3.6/site-packages
I found that there is a line-bot-sdk in the above path. We have to move this to Anaconda's virtual environment.
Next, check the path of the virtual environment.
$ python
>>> import sys
>>> import pprint
>>> pprint.pprint(sys.path)
['',
'/Users/username/opt/anaconda3/envs/GetUpEarly/lib/python37.zip',
'/Users/username/opt/anaconda3/envs/GetUpEarly/lib/python3.7',
'/Users/username/opt/anaconda3/envs/GetUpEarly/lib/python3.7/lib-dynload',
'/Users/username/opt/anaconda3/envs/GetUpEarly/lib/python3.7/site-packages']
In my case, these five? Was the enabled path. So this time I decided to put the line-bot-sdk file directly under the python3.7 folder.
Finally, make sure that line-bot-sdk is included in the confirmation.
$ pip freeze
I'm still groping because I don't know much about environment construction. Please point out if there are any mistakes in this way.
Recommended Posts