0👍
You will need XCode to compile with gcc on macOS.
Install it with this command in the terminal:
xcode-select --install
Or you cold install it from the app store.
- [Django]-Best practice to serve static files in Django
- [Django]-Add initial data to the database
- [Django]-How to run django server with ACTIVATED virtualenv using batch file (.bat)
- [Django]-Does Django create useless migrations?
0👍
You should use virtualenv and Python Setup Tools/PIP to install all you packages for django.
This makes your job of package installs/upgrades very easy.
pip install virtualenv
This will install the virtualenv. Now create and activate a virtual environment using this virtualenv like this:
virtualenv <any_name_you_want_for_this_virtual_env>
e.g.
virtualenv api-venv
This will create a directory: api-venv in the current directory you are in.
Now activate this environment and then install all your packages using ‘pip’ command. This way, pip will install all packages inside this api-venv environment only.
source api-venv/bin/activate
Now the api-venv is activated. Let’s install ‘psycopg2’
pip install psycopg2
I would recommend to install django inside this venv so everything is in the venv.
pip install django
You can create as many such virtual environments as you like with different configuration.
Done!
- [Django]-Realtime data processing in Django/Python
- [Django]-How to add db_index=True to email field of django auth_user
- [Django]-Can't run Scrapy project in Django
- [Django]-Django problem with extends template tag
- [Django]-Django: filtering queryset by "parameter has part of field's value"?
0👍
You can try this way. First, you should install PostgreSQL through brew.
brew install postgresql
Then you should add pg_config to PATH. You can find pg_config with.
which pg_config
Finally, install psycopg2 with pip.
pip install psycopg2
- [Django]-Django ORM: get the monthly average of price for each category
- [Django]-How to access inline data in django ModelAdmin
- [Django]-How to use a custom decorator with default Django auth login view
- [Django]-How to convert encoded unicode to readable unicode