question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can't copy 'docx/templates/default-docx-template' on pip install python-docx

See original GitHub issue

Hi, I’m not sure if this is the right place for posting this but, I’ve installed the package using pip install python-docx, and tried to execute the first tutorial. Then got this error:

"Package not found at '%s'" % pkg_file docx.opc.exceptions.PackageNotFoundError: Package not found at '/home/----/anaconda3/envs/myenv/lib/python3.6/site-packages/docx/templates/default-docx-template'

Then I went to the folder and there is no default-docx-template folder. I checked here on GitHub and it’s there.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:20 (8 by maintainers)

github_iconTop GitHub Comments

20reactions
scannycommented, Jan 10, 2019

UPDATE: Short answer is to update your setuptools:

$ pip install -U setuptools

Hmm, could be a problem with the MANIFEST.ini, that directory was just added on the last release which makes me suspect. I’ll check it out here …

4reactions
K4zukicommented, Jan 10, 2019

@RogueRaider Could you please provide setuptools version?

I was facing similar situation.

Failing on following setup

  • OS: Ubuntu 16.04
  • Python: 2.7.10 and 3.5.2
  • setuptools: 20.7.0

It worked on following setup

  • OS: MacOS
  • Python: 3.6.5
  • setuptools: 40.6.2

On ubuntu by updating setuptools pip install -U setuptools it worked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python-docx won't install with loads of errors - Stack Overflow
xml -> build/lib/docx/templates error: can't copy 'docx/templates/default-docx-template': doesn't exist or not a regular file ------------------ ...
Read more >
python-docx install fails with pip - Super User
Seems it was a problem with the source, I downloaded the source and removed the folder docx/templates/default-docx-template , then installed ...
Read more >
Can't install docx with pip : r/learnpython - Reddit
pip install python -docx. Here's the error from Windows CMD: error: can't copy 'docx\templates\default-docx-template': doesn't exist or not a ...
Read more >
python import docx error - rtt - IT Resource
Running setup.py install for python-docx error: can't copy 'docx/templates/default-docx-template': doesn't exist or not a regular file
Read more >
Welcome to python-docx-template's documentation! — python ...
pip install docxtpl. or using conda: conda install docxtpl --channel conda-forge ... Now you can use python-docx-template to generate as many word documents ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found