Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Import problems
#1
I am trying to use python-docx, but I can't get it to import. I'm pretty sure it's installed- if I do pip install python-docx, I get the message: Requirement already satisfied: python-docx in /Library/Python/2.7/site-packages.

Writing that, I realized that the file might be in the wrong place (it says 2.7 but I'm using python 3), but I don't know how to change that and I am useless with the command line stuff.

What should I do?
Reply
#2
You should tell that you use Mac.
Homebrew is standard for Mac.
$ pip2 -V  # pip pointing to the Homebrew installed Python 2 interpreter
$ pip3 -V  # pip pointing to the Homebrew installed Python 3 interpreter (if installed)
Doing it right from Hitchhiker's Guide to Python.
Reply
#3
You have to use pip3 to install in python3 site-packages
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020