eclipse pydev - how to install python modules -
just working way through (very good) book call test driven development using python.
this makes use of python3.4 way. way, running in windows 7 os.
i've got stuff working using simple text editor , running command line... in course of in particular used "pip install" install django , selenium, per book's instructions. created folders "selenium" , "django" under ...\python34\lib\site-packages\ ... added these pythonpath eclipse/pydev project.
with correct interpreter selected tried run file runs fine on command line: "> python3 functional_tests.py"...
file "d:\apps\python34\lib\site-packages\django\http\__init__.py", line 1, in <module> django.http.cookie import simplecookie, parse_cookie file "d:\apps\python34\lib\site-packages\django\http\cookie.py", line 5, in <module> django.utils.six.moves import http_cookies importerror: cannot import name 'http_cookies'
... me looks dependency thing... though "pip install" handles dependency matters in way including single folder doesn't.
question boils down this: what's "proper" way install python module using pydev?
several days later
wow... nothing? nothing! suppose must mean either have add dependencies manually or use ant, maven or gradle within eclipse itself. these latter not strong areas, outside ide. still nice have answer pydev expert!
well, pip install should work pydev (it should automatically recognize dependency)...
i.e.: in use case, folder should in pythonpath d:\apps\python34\lib\site-packages (and pip should install packages folder -- make sure don't add folders "d:\apps\python34\lib\site-packages\django" nor else inside site-packages pythonpath).
if it's still not working, please check if module django.utils.six.moves.http_cookies indeed expect be. also, can print pythonpath being used in runtime with:
import sys print('\n'.join(sorted(sys.path)))
to check if that's expect.
Comments
Post a Comment