python-docx package successfully installed, but I can't find it and can't access it via import docx
See original GitHub issueI have installed latest version of pip and python-docx on my mac, however, docx
module isn’t listed in the lib --> site-packages
folder. Would someone tell me why I can find the that module? When I try to import the docx module in a file, it’s not there. I’m using Python 3.7, Pycharm 2018, mac 10.13.4
pip install python-docx --user
Collecting python-docx Requirement already satisfied: lxml>=2.3.2 in /Library/Python/2.7/site-packages (from python-docx) (4.2.3)
matplotlib 1.3.1 requires nose, which is not installed.
matplotlib 1.3.1 requires tornado, which is not installed.
Installing collected packages: python-docx
Successfully installed python-docx-0.8.6
$ pip --version
pip 10.0.1 from /Library/Python/2.7/site-packages/pip (python 2.7)
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Why am I getting a ModuleNotFoundError trying to import ...
python -docx seems like the perfect solution, but it throws a ModuleNotFoundError even after an apparently successful install. I use anaconda, so ...
Read more >python-docx not working 'ModuleNotFound' : Forums
No problem, installed successfully. Tried to import it as suggest in the documentation and I keep getting this error. ModuleNotFoundError: ...
Read more >Can't import docx after installing 0.8.5
I uninstalled a previous version of python-docx successfully. I tried pip install python-docx, and it downloaded lxml 3.4.4 and python-docx 0.8.
Read more >Welcome to python-docx-template's documentation! — python ...
To install using pip: pip install docxtpl. or using conda: conda install docxtpl --channel conda-forge. Usage: from docxtpl import DocxTemplate doc ...
Read more >Chapter 13 – Working with PDF and Word Documents
This chapter will cover two such modules: PyPDF2 and Python-Docx. ... If the module was installed correctly, running import PyPDF2 in the interactive...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have resolved the problem in my case and it was not a problem of PyCharm itself. Accidentally I’ve been using a pre-release version of python. Switching to a release version solved the problem.
Hello joem76, I had same problem on my laptop. And I could fix it be referring to following link shared in your post. It worked.
https://stackoverflow.com/questions/26069254/importerror-no-module-named-bottle-pycharm
The reason was I installed several Python Editors, Clients like PyCharm, Anaconda and due that several copies of python.exe were present on my local drive.
PyCharm has option to compile code using the specific pythone.exe present on your local drive. In my case I selected the correct python.exe and all errors were gone.
This is similar situation in Java environment where you have several JDKs on your machine and you need to choose the correct and compatible one to compile your code without errors.
Thanks evreryone for their contribution to fix this problem.