Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Setting up development environment

Subscribe

Get notified when there's activity on this post

This question has been flagged
4 Replies
641 Views
Avatar
Lincoln Eddy

I'm setting up a development environment on Windows 10. I have installed GIT, PyCharm and PostgreSQL.

When I run Odoo and attempt to create the database I get this error ...

psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: FATAL:  collations with different collate and ctype values are not supported on this platform


 

0
Avatar
Discard
Codesphere Tech

Can you share the screenshot of this error and values of the database you entered.?

Lincoln Eddy
Author

Here is the command to run odoo, followed by the log ...

(.venv) PS C:\Users\linco\Development\odoo> python odoo-bin -r odoo -w odoo --addons-path=C:\Users\linco\Development\odoo\addons -d odoo -i base
2025-11-27 08:17:33,876 7648 WARNING ? odoo.tools.config: missing --http-interface/http_interface, using 0.0.0.0 by default, will change to 127.0.0.1 in 20.0
2025-11-27 08:17:33,877 7648 INFO ? odoo: Odoo version 19.0
2025-11-27 08:17:33,877 7648 INFO ? odoo: Using configuration file at c:\users\linco\development\odoo\odoo.conf
2025-11-27 08:17:33,877 7648 INFO ? odoo: addons paths: _NamespacePath(['C:\\Users\\linco\\Development\\odoo\\odoo\\addons', 'C:\\Users\\linco\\AppData\\Local\\OpenERP S.A.\\Odoo\\addons\\19.0', 'c:\\users\\linco\\development\\odoo\\addons'])
2025-11-27 08:17:33,877 7648 INFO ? odoo: database: odoo@localhost:5432
2025-11-27 08:17:34,225 7648 INFO ? odoo.sql_db: Connection to the database failed
2025-11-27 08:17:34,225 7648 WARNING ? odoo.service.db: Unable to create PostgreSQL extensions : connection to server at "localhost" (::1), port 5432 failed: FATAL: collations with different collate and ctype values are not supported on this platform

Codesphere Tech

Share the odoo.conf file here or you can match it with my conf
admin_passwd = Your Password
db_host = localhost
db_port = 5432
db_user = odoo
db_password = odoo
addons_path = Your Odoo Addons path
http_port = 1202
bin_path = C:\Program Files\wkhtmltopdf\bin
pg_path= C:\Program Files\PostgreSQL\14\bin

Kurt Maurer

I had the same problem, the same error message:

I uninstalled Postgresql 18 and installed Postgresql 16, now it's fine!

Avatar
Lincoln Eddy
Author Best Answer

Adding this to the .conf file fixed the issue ... 

db_template = template1
1
Avatar
Discard
Avatar
Kuldeep Singh
Best Answer

Hello, 

This error happens on Windows when PostgreSQL is installed with a database collation that does not match the system locale expected by Odoo. On Windows, PostgreSQL is strict about LC_COLLATE and LC_CTYPE values, and Odoo requires both to be the same while creating a new database.

If PostgreSQL was installed using a different locale (for example, default Windows collation) and Odoo tries to create a database with C or en_US, this conflict occurs. To fix this, reinstall PostgreSQL and choose a locale like English_United States for both collation and character type, or manually create the database with matching LC_COLLATE and LC_CTYPE values.

After aligning the locale settings, restart PostgreSQL and run Odoo again to create the database successfully.


For reference, you can also follow the Odoo Windows re-installation steps - https://webkul.com/blog/openerp-all-in-one-windows-cant-re-install-postgresql/

0
Avatar
Discard
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

This error happens on Windows when PostgreSQL is installed with mismatched collation and ctype settings, something Windows does not support. Odoo needs the database cluster to use the same LC_COLLATE and LC_CTYPE, but your PostgreSQL instance was initialized with different values, so Odoo cannot create or connect to the database. The solution is to reinstall or reinitialize PostgreSQL using matching locales—for example, reinstall PostgreSQL and allow it to use the default Windows locale (English_United States.1252 for both collate and ctype). Alternatively, you can manually drop and recreate the database using matching settings through pgAdmin or SQL: CREATE DATABASE odoo WITH TEMPLATE template0 LC_COLLATE='English_United States.1252' LC_CTYPE='English_United States.1252';. Once PostgreSQL has consistent collation settings, Odoo will connect and create databases normally.

For reference, you can also follow the Odoo Windows installation steps here: https://www.cybrosys.com/blog/how-to-install-odoo-17-in-windows


Hope it helps


0
Avatar
Discard
Avatar
Mr. Rana
Best Answer
Here, you can set basic conf for odoo.conf

db_host = localhost
db_port = 5432
db_user = postgres
db_password = yourpassword
addons_path = C:\Users\linco\Development\odoo\addons

After that,

Check your python version by :-
​python --version
(Because for Odoo 19.0, python3.12 is suitable)

Activate the Python virtual environment and run below :-
​pip install -r requirements.txt


Then after you can start Odoo by :-
​python odoo-bin -d DB_NAME -i base

0
Avatar
Discard
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now