shell - How to install a module on Python? -
okay, so, i'm beginner in programming python, , found out yesterday how supposed encode pip install modulename
in python command line , not in interactive shell. i'm trying download lot of modules, such send2trash module, pyperclip, requests, beautiful soup, , selenium.
before checked forums installing modules, found out how needed have pip tool. i'm windows user, reason, didn't have 'scripts' folder installed when downloaded python. didn't know needed it, used raw scripts github, setup.py, , copy pasted script file editor in python, ran in interactive shell, , tried import module needed. worked pyperclip , requests module; no errors popped after imported them using import pyperclip
or import requests
, when tried same procedure rest of modules needed, there errors.
also, when tried download modules on pypi.python.org, tried open using interactive shell, pops up, 'the file's encoding invalid python3.x...', , when click 'ok', it's going 'failed decode', , close everything.
so, after reading forum after forum, found out how download pip, , able download setuptools , wheel. i'm not sure if it's really downloaded, able 'scripts' folder wasn't there before, guess so. went path
using edit environment account thing, , edited path
variable value lead 'scripts' folder. please tell me if did right thing here.
so, following advice of forums, tried install modules needed typing pip install modulename
in python command line instead of interactive shell, still gave me syntax error. tried in command prompt, typing same code pip install modulename
, when clicked enter, nothing happens; no errors or anything. seemed install accepted, when tried importing module in interactive shell, still gave import error.
please tell me did wrong throughout process, , how install modules need. include pictures this, seems can add 2 before reputation becomes 10, , i'm pretty new here, so... if there's need elaborate on problem, don't hesitate ask, , i'll try best.
you use windows need understand pip. pip program installs python modules. can use easy_install instead of pip. pip commands
pip list
-- lists out installed modules.
pip search <module name>
-- searches new modules.
pip -h
-- more pip commands want.
pip installs modules cmd prompt not from python shell.
even after installing modules modules doesn't run import module
need imported from module import function
.
refer pip command , install modules.
do not save script files in python root folder may face problems
happy programming!!!
Comments
Post a Comment