This question already has answers here:
pg_config executable not found
(54 answers)
Closed 3 years ago.
I am having trouble installing redshift on my django app.
When I am running
pip3 install django-redshift-backend
I get the error pg_config executable not found. My version of pip is 9.0.1 and I don't know why I'm having this error.
Can you help me on this?
I solved this problem by reinstalling libpq-dev.
It may help people facing the same issue.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I just upgraded Ubuntu from 18.04 to 20.04, and ALL my Django projects (tens of them) were not working.
One of the problem related to psycopg2 when executing pip:
For example, there is "psycopg2==2.7.3.1" in my "requirements.txt" file, and running "pip install -r requirements.txt" resulted in errors when building wheel for psycopg2.
Change "psycopg2==2.7.3.1" to ""psycopg2-binary" solved the problem.
So, is such change necessary for all projects running on Ubuntu 20.04?
Other error examples from various projects when running server:
RuntimeError: __class__ not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was __classcell__ propagated to type.__new__?
SyntaxError: Generator expression must be parenthesized (widgets.py, line 151)
AssertionError: SRE module mismatch
ModuleNotFoundError: No module named 'decimal'
... etc.
How to I fix these problems? I've been in a headache for weeks.
Your problem with psycopg2 is apparently due to an incompatibility between python 3.8 and older versions of psycopg2. (Issue #854)
The problem has been fixed, but it was not backported to the release that you are using. It has however been backported to the binary psycopg2 releases in various Linux distros.
So ... yes ... you are going to have to make some changes for all of your Django projects that use psycopg2 to get them to run on vanilla Ubuntu 20.04.
However, it looks like there are at least 3 ways to "fix" this:
Change to the "binary" package as you have done.
Change the psycopg2 version in your "requirements.txt" to 2.8.6 or later1.
Build, install and use python 3.7 or earlier. (Probably a bad idea in this case.)
1 - Or maybe 2.8.0_BETA2 or later because it looks like the fix has been backported that far in the source code repo. It depends on whether the patched releases were uploaded to PyPi ... which I didn't check. But all things being equal, updating to the most recent compatible version is preferable.
This question already has answers here:
how to check which version of nltk, scikit learn installed?
(10 answers)
Closed 4 years ago.
I have Scikit-Learn installed on my system. How can I check its version and its availability in my system?
This seems like a duplicate of this question
As mentioned there you can do this from a Python REPL:
import sklearn
print(sklearn.__version__)
If scikit-learn is not found on your system, you will get an ImportError: No module named sklearn. If scikit-learn was installed inside a virtualenv, you will need to make sure it is activated via source bin/activate from the virtualenv root directory.
This question already has answers here:
Qt debian/ubuntu: Can't compile, error: cannot find -lGL
(2 answers)
Closed 7 years ago.
When I try to compile the HelloWorld widget application in Qt, I get the following error:
/usr/bin/ld: cannot find -lGL
I searched in the Internet but could not find what is the name of the package that contains this library.
I use ubuntu and have essential build tools installed on my PC.
basically you should look for libGL (libGL.so). But the package to install depends on your graphics card
For nvida it is nvidia-331-updates (newer or older ones will also work)
This question already has answers here:
Cygwin Make bash command not found
(9 answers)
Closed 7 years ago.
I am using Cygwin to compile some C++ files.
there is an file named Makefile. Now when I use this command in Cygwin,
make -f Makefile
the following error is displaying.
-bash: make: command not found
Could someone tell me what might be the problem?
maybe you have to install the make package. I'm not sure about the package name but try using "sudo apt-get install make" and press tab key to see if have some package. I had this problem one time and in someway the make command wasn't installed in my machine, I installed the package and it worked!
I hope it help!
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to Install Cocos3D for iPhone/iPad ?
I have already install cocos2d template.How to install cocos 3d template?
I suggest you head to this link: http://www.learn-cocos2d.com/2011/04/cocos2d-installer-updated-added-cocos3d/ there you can download an installer that will install cocos3d and cocos2d + all templates. Just follow the instructions provided. The installer was created by Steffen Itterheimer, he'll be happy if you leave some feedback ;)