简体   繁体   中英

Eclipse cannot import already installed pip package

So basically I used pip to import the docx python package and it installed correctly, (verified by the freeze command). However I cannot import the package in eclipse.

Through some serious effort I've noticed that I can import the package using the 32 bit IDLE shell whereas I cannot when using the 64 bit IDLE shell. My PC is 64 bit and so I do not why I cannot import a 32 bit package in eclipse, a problem I've never encountered before.

Does anybody have any insights as to how I can import this package properly in eclipse? I'm sure there's a very reasonable cause and hopefully solution as to why this is happening and would really appreciate if anyone could help with this issue as I need to use this package for the specific project I aim to do.

side note: I'm using python 3.6 if that's of any relevance

You Should try to install the 64 bit version of python. And don't go for latest version use. 3.5 instead. Make sure you install the pip libraries when you are installing python. And your try to configure your eclipse. Try install updates for python in eclipse. and configure it.

Check this documentation it might help.

https://www.ics.uci.edu/~pattis/common/handouts/pythoneclipsejava/eclipsepython.html

thanks for the reply.

The actual problem was that I was using python 3.6 where eclipse only accepts python grammar versions up to 3.5. The docx package also only works with python 2.6, 2.7, 3.3, or 3.4 so I installed python 3.4 and docx is now working!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM