![]() |
Could not install PIP on Shell - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: Could not install PIP on Shell (/thread-5437.html) Pages:
1
2
|
Could not install PIP on Shell - allwell - Oct-03-2017 Hello, I have downloaded/installed Python 3.4.3. set path to proper directory from window's command prompt. I have verified pip in the directory. From WIN10 Command prompt, I can run PIP and install packages. However,PIP is not recognized in Python 3.4.3 shell. From window's 10 command prompt, I can install pip and other packages: C:\>pip Usage: pip <command> [options] Commands: install Install packages. uninstall Uninstall packages. freeze Output installed packages in requirements format. list List installed packages. show Show information about installed packages. search Search PyPI for packages. wheel Build wheels from your requirements. zip DEPRECATED. Zip individual packages. unzip DEPRECATED. Unzip individual packages. help Show help for commands. General Options: -h, --help Show help. --isolated Run pip in an isolated mode, ignoring environment variables and user configuration. -v, --verbose Give more output. Option is additive, and can be used up to 3 times. -V, --version Show version and exit. -q, --quiet Give less output. --log <path> Path to a verbose appending log. --proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port. --retries <retries> Maximum number of retries each connection should attempt (default 5 times). --timeout <sec> Set the socket timeout (default 15 seconds). --exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup. --trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any HTTPS. --cert <path> Path to alternate CA bundle. --client-cert <path> Path to SSL client certificate, a single file containing the private key and the certificate in PEM format. --cache-dir <dir> Store the cache data in <dir>. --no-cache-dir Disable the cache. --disable-pip-version-check Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index. C:\>python -m pip install beautifulsoup4 You are using pip version 6.0.8, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. Collecting beautifulsoup4 Downloading beautifulsoup4-4.6.0-py3-none-any.whl (86kB) 100% |################################| 90kB 1.5MB/s Installing collected packages: beautifulsoup4 Successfully installed beautifulsoup4-4.6.0 C:\> However, PIP is not recognized in Python 3.4.3 Shell. >>> pip install SyntaxError: invalid syntax >>> pip Traceback (most recent call last): File "<pyshell#11>", line 1, in <module> pip NameError: name 'pip' is not defined >>> python -m pip install beautifulsoup4 SyntaxError: invalid syntaxPlease advise. Thanks RE: Could not install PIP on Shell - snippsat - Oct-03-2017 (Oct-03-2017, 08:18 PM)allwell Wrote: C:\> However, PIP is not recognized in Python 3.4.3 Shell.pip is only for use on command line. There is no point using 3.4.3,use 3.6. Look at Python 3.6 and pip installation under Windows, part-2. RE: Could not install PIP on Shell - buran - Oct-03-2017 you started right. you need to work with pip from command prompt. to upgrade pip do C:\>python -m pip install -U pip in the last part you get syntax error because you try to run pip from python interactive prompt, not from command prompt RE: Could not install PIP on Shell - allwell - Oct-03-2017 (Oct-03-2017, 08:26 PM)snippsat Wrote:I did install 3.6.2 however, it's not giving me the shell window. Any idea how to get the shell in this version of Python? Moreover, I do not see any directory (Like Python34) created after the install of 3.6. So I uninstalled it and installed this 3.4 version.(Oct-03-2017, 08:18 PM)allwell Wrote: C:\> However, PIP is not recognized in Python 3.4.3 Shell.pip is only for use on command line. Please advise. Thanks (Oct-03-2017, 08:27 PM)buran Wrote: you started right. you need to work with pip from command prompt. to upgrade pip doThat's Python 3.4.3 Shell I'm using this Shell for creating the programs. How do I make it understand PIP? Thanks for your help. RE: Could not install PIP on Shell - snippsat - Oct-03-2017 (Oct-03-2017, 08:36 PM)allwell Wrote: Please advise.Read and look at pictures in my link,you see you most choose Customize Installation .Here you choose own path like C:\python36 .
RE: Could not install PIP on Shell - allwell - Oct-03-2017 Thanks snippsat. Do I need to uninstall first the 3.4.3 version prior installing 3.6 or I can do it later? RE: Could not install PIP on Shell - snippsat - Oct-03-2017 (Oct-03-2017, 08:52 PM)allwell Wrote: Do I need to uninstall first the 3.4.3 version prior installing 3.6 or I can do it later?You can do that later. RE: Could not install PIP on Shell - allwell - Oct-03-2017 Worked like a charm. However can not use this PIP in Shell as yet. C:\>pip -V pip 9.0.1 from c:\python36\lib\site-packages (python 3.6) C:\>pip install requests Collecting requests Downloading requests-2.18.4-py2.py3-none-any.whl (88kB) 100% |████████████████████████████████| 92kB 920kB/s Collecting urllib3<1.23,>=1.21.1 (from requests) Downloading urllib3-1.22-py2.py3-none-any.whl (132kB) 100% |████████████████████████████████| 133kB 1.5MB/s Collecting idna<2.7,>=2.5 (from requests) Downloading idna-2.6-py2.py3-none-any.whl (56kB) 100% |████████████████████████████████| 61kB 3.4MB/s Collecting certifi>=2017.4.17 (from requests) Downloading certifi-2017.7.27.1-py2.py3-none-any.whl (349kB) 100% |████████████████████████████████| 358kB 1.4MB/s Collecting chardet<3.1.0,>=3.0.2 (from requests) Downloading chardet-3.0.4-py2.py3-none-any.whl (133kB) 100% |████████████████████████████████| 143kB 3.0MB/s Installing collected packages: urllib3, idna, certifi, chardet, requests Successfully installed certifi-2017.7.27.1 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22 C:\>python Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> r = requests.get('https://www.python.org/') >>> r.status_code 200 File "<stdin>", line 1 r.status_code 200 ^ SyntaxError: invalid syntax >>> r.encoding 'utf-8' File "<stdin>", line 1 r.encoding 'utf-8' ^ SyntaxError: invalid syntax >>> r.headers['date'] 'Tue, 03 Oct 2017 21:08:55 GMT' Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> pip Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> pip NameError: name 'pip' is not defined >>> pip install SyntaxError: invalid syntax >>> RE: Could not install PIP on Shell - sparkz_alot - Oct-03-2017 As has been mentioned above, do not use 'pip' in the Python shell. It is used from the command line. If you are just starting out, you should be using the latest version of Python, currently 3.6.3. If I were you, I would remove all version of Python you have installed, then install 3.6.3, making sure you download either the 32 bit version or 64 bit version, depending on which your OS is running. RE: Could not install PIP on Shell - snippsat - Oct-03-2017 (Oct-03-2017, 09:33 PM)sparkz_alot Wrote: I would remove all version of Python you have installed, then install 3.6.3If have 3.6.0 and try to install 3.6.3 it comes up a update option, just push that and it will update automatic,if happy with previous setup like Path 32/64-bit ect. |