Wednesday 29 July 2020

Install python packages in pycharm without Project Interpreter

In Pycharm, Generally you can install python packages through interpreter by following steps..

In Pycharm

  • Press Ctr + Alt + s
  • On left, Project <your project here> > Project Interpreter
  • On right, click on +
  • At the top, search for boto3
  • At the bottom, click on Install Package

But if it doesn't help then , follow the steps:

1. run following command in new python file, and find the python current path.

import sys
print (sys.executable)


2. Install the package from that location using correct pip with --user option.

hem-mac:bin hemepate$ pwd
/Users/hem/Documents/Oracle/Docs/MachineL/Ex_Files_ML_EssT_Recommendations/Exercise Files/venv/bin

hemepate-mac:bin hemepate$ pip3 --user install boto3 Usage: pip3 <command> [options] no such option: --user hem-mac:bin hemepate$ pip3 install --user boto3 Collecting boto3 Using cached boto3-1.14.30-py2.py3-none-any.whl (129 kB) Collecting s3transfer<0.4.0,>=0.3.0 Using cached s3transfer-0.3.3-py2.py3-none-any.whl (69 kB) Collecting botocore<1.18.0,>=1.17.30 Using cached botocore-1.17.30-py2.py3-none-any.whl (6.4 MB) Collecting jmespath<1.0.0,>=0.7.1 Using cached jmespath-0.10.0-py2.py3-none-any.whl (24 kB) Collecting python-dateutil<3.0.0,>=2.1 Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB) Collecting urllib3<1.26,>=1.20; python_version != "3.4" Using cached urllib3-1.25.10-py2.py3-none-any.whl (127 kB) Requirement already satisfied: docutils<0.16,>=0.10 in /usr/local/lib/python3.8/site-packages (from botocore<1.18.0,>=1.17.30->boto3) (0.15.2) Collecting six>=1.5 Using cached six-1.15.0-py2.py3-none-any.whl (10 kB) Installing collected packages: six, python-dateutil, jmespath, urllib3, botocore, s3transfer, boto3 Successfully installed boto3-1.14.30 botocore-1.17.30 jmespath-0.10.0 python-dateutil-2.8.1 s3transfer-0.3.3 six-1.15.0 urllib3-1.25.10

Thursday 9 July 2020

Install python packages in Anaconda Navigator


hemepate-mac:bin hemepate$ pwd
/Users/hemepate/anaconda3/bin

hemepate-mac:bin hemepate$ ls -lrt pip*
-rwxrwxr-x  1 hemepate  staff  236 23 Sep  2019 pip
hemepate-mac:bin hemepate$


hemepate-mac:bin hemepate$ ./pip install tabulate
Collecting tabulate
  Downloading https://files.pythonhosted.org/packages/c4/f4/770ae9385990f5a19a91431163d262182d3203662ea2b5739d0fcfc080f1/tabulate-0.8.7-py3-none-any.whl
Installing collected packages: tabulate
Successfully installed tabulate-0.8.7