Search code examples
pythonmacosreportlab

Cannot install reportlab in pycharm(venv) on macOS


The problem

  • Right now I am trying to set up a virtual development environment on a macOS in pycharm.
  • The issue that I am facing is with this command pip install -r requirements.txt
  • I am using python 2.7 right now and I am needing to install reportlab==2.4
  • I also get an error message when I try to install reportlab outside of pycharm and outside of my venv, that is if I explicitly do pip install reportlab==2.4 in the terminal

I will include some of the screenshots of the errors but it is about 800+ lines of output going through the process of copying, creating, and displaying syntax error messages/other errors.

Something else that I have noticed is that a lot of the errors start with 'cc' which might be an issue because I am writing in pycharm on a mac and there might be some dependencies that I am missing/I don't have support for C code somewhere? I have installed xcode command tools already but the version of gcc might be too new/too strict? the version is xcode-select version 2384

I have tried a lot of things to get this working but cannot seem to crack it. I will try to answer questions as I see them but in the meantime, if you have any suggestions, I am open to anything.

Thanks!

error 1

error 2

error 3

error 4

error 5

error 6

error 7


Solution

  • ** UPDATE ** I did see that most of these were just warnings. I managed to find a command that suppressed these warnings and allowed reportlab==2.4 to install correctly.

    CFLAGS="-Wno-error=implicit-function-declaration" pip install reportlab==2.4