Can't get Creme to install - need help please.
Hi Everyone,

I am new here and somewhat new to coding.  I have a project that could make use of a great CRM and would like to explore the capabilities of Creme. 

I have been trying to get Creme installed on a local Fedora laptop, but without success.  The instructions are likely very clear to someone who knows Django well, but unfortunately not good enough for a Django noob (like me).

As mentioned, I am running Fedora (38) on a Thinkpad laptop (64G RAM, 6TB SSD, Xeon processor).

I've created a virtual env under Python 3.9 (also tried 3.11, but that didn't work either).

In my project root directory (CREME) I have two subdirectories, creme-crm (having installed from ZIP file) and env3.9.16 (the virtual env).

Changing directory into creme-crm and then running pip install -e .[pgsql] works for a bit and then produces the following error:
Collecting certifi>=2017.4.17 (from requests>=2.24.0->pyHanko>=0.12.1->xhtml2pdf==0.2.9->creme-crm==2.5a1)
  Using cached certifi-2023.5.7-py3-none-any.whl (156 kB)
Collecting pycairo>=1.20.0 (from rlPyCairo<1,>=0.2.0->reportlab>=3.5.53->xhtml2pdf==0.2.9->creme-crm==2.5a1)
  Using cached pycairo-1.23.0.tar.gz (344 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pycparser (from cffi>=1.12->cryptography>=3.3.1->pyHanko>=0.12.1->xhtml2pdf==0.2.9->creme-crm==2.5a1)
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Building wheels for collected packages: creme-crm, pycairo
  Building editable for creme-crm (pyproject.toml) ... done
  Created wheel for creme-crm: filename=creme_crm-2.5a1-0.editable-py3-none-any.whl size=7967 sha256=d11221cb01dc9dee3befca99e1a5131326d11f68cbb859390f9f524d6b14502c
  Stored in directory: /tmp/pip-ephem-wheel-cache-88erz_8o/wheels/4e/f2/31/690ba39ad6f36fa1fb514effc290a0cb58a8e97629719f90f5
  Building wheel for pycairo (pyproject.toml) ... error
  error: subprocess-exited-with-error
  × Building wheel for pycairo (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-39
      creating build/lib.linux-x86_64-cpython-39/cairo
      copying cairo/ -> build/lib.linux-x86_64-cpython-39/cairo
      copying cairo/__init__.pyi -> build/lib.linux-x86_64-cpython-39/cairo
      copying cairo/py.typed -> build/lib.linux-x86_64-cpython-39/cairo
      running build_ext
      Package cairo was not found in the pkg-config search path.
      Perhaps you should add the directory containing `cairo.pc'
      to the PKG_CONFIG_PATH environment variable
      Package 'cairo', required by 'virtual:world', not found
      Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycairo
Successfully built creme-crm
Failed to build pycairo
ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects

So have been assuming I need to learn something obvious but after 2 and half days it isn't obvious (and I see that many other people are having similar challenges on other Django projects not related to Creme.

Really hoping someone can provide me a bit guidance on how to get this running, please.

Thank you

Pièces jointes Miniature(s)

some days ago a new dependence appeared in a Python package we use to generate PDF files: Cairo.
I've fixed the README file of the future version 2.4.4 of Creme, but you can already install the development package for "cairo" to fix the issue.
On Debian/Ubuntu I installed the system package (i.e. apt-get) "libcairo-dev" (sorry I don't know its name on Fedora) ; once it is installed you can try to resume the installation of Python packages with 'pip'.

Have a good day!
Thank you so much for this. I shall try this and let you know how it goes.

In any case, I very much appreciate your help here.
(26-05-2023, 05:39)Technowonk a écrit : Thank you so much for this.  I shall try this and let you know how it goes.

In any case, I very much appreciate your help here.

After a bit of research for Fedora the package is called "cairo-devel"  and is installed using
"sudo dnf install cairo-devel"  (without the quotes)

I missed the instruction to have these all already installed and now see that if I had done this first (properly as per the instruction) I would not have had the long delay together with the frustration.  On the other hand, I have now learned more about this process.

For others getting this running on Fedora also note that:
python-dev => python-devel
libpq-dev => libpq-devel
libjpeg-dev => libjpeg-devel

But I'm on to a new challenge.

I have created a new directory and within it I have create a new virtual environment using Python 3.11.3.  I then installed Creme again using "pip install creme-crm" (and everything appears to have installed without error). No postgresql this time (I will figure that out later). 

I then ran "creme creme_start_project my_project" which then instructed me to edit the file in my_project/my_project.  The only change I made was to the Time Zone Settings.

Now when running "creme migrate --settings=my_project.settings"  I get the following:

/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/http/ DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
  import cgi
/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/utils/ DeprecationWarning: Use setlocale(), getencoding() and getlocale() instead
  encoding = locale.getdefaultlocale()[1] or 'ascii'
:283: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead
Traceback (most recent call last):
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/bin/creme", line 8, in
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/creme/", line 39, in execute
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/core/management/", line 419, in execute_from_command_line
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/core/management/", line 413, in execute
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/core/management/", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/core/management/", line 398, in execute
    output = self.handle(*args, **options)
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/core/management/", line 89, in wrapped
    res = handle_func(*args, **kwargs)
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/core/management/commands/", line 75, in handle
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/core/management/", line 419, in check
    all_issues = checks.run_checks(
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/core/checks/", line 76, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/core/checks/", line 40, in check_url_namespaces_unique
    all_namespaces = _load_all_namespaces(resolver)
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/core/checks/", line 57, in _load_all_namespaces
    url_patterns = getattr(resolver, 'url_patterns', [])
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/utils/", line 48, in __get__
    res = instance.__dict__[] = self.func(instance)
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/urls/", line 602, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/utils/", line 48, in __get__
    res = instance.__dict__[] = self.func(instance)
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/urls/", line 595, in urlconf_module
    return import_module(self.urlconf_name)
  File "/usr/lib64/python3.11/importlib/", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1206, in _gcd_import
  File "", line 1178, in _find_and_load
  File "", line 1149, in _find_and_load_unlocked
  File "", line 690, in _load_unlocked
  File "", line 940, in exec_module
  File "", line 241, in _call_with_frames_removed
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/creme/", line 5, in
    from django.contrib.auth import views as auth_views
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/contrib/auth/", line 10, in
    from django.contrib.auth.forms import (
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/contrib/auth/", line 11, in
    from django.contrib.auth.tokens import default_token_generator
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/contrib/auth/", line 117, in
    default_token_generator = PasswordResetTokenGenerator()
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/contrib/auth/", line 18, in __init__
    self.secret = self.secret or settings.SECRET_KEY
  File "/home/technowonk/dev/CRM/CREME-TEST2/env3.11.3/lib64/python3.11/site-packages/django/conf/", line 90, in __getattr__
    raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.

Thank you for your help - very much appreciate any feedback towards getting this package running.

Sending my best wishes for a great week ahead!

Atteindre :

Utilisateur(s) parcourant ce sujet : 1 visiteur(s)