DEV Community

Imran
Imran

Posted on

Python Lib path in RHEL 7

I have a Virtual machine with RHEL 7. Where Python2.7 is installed (by default) comes with it. I have installed Python 3.6 installed separately like below.

wget https://www.python.org/ftp/python/2.7.6/Python-3.6.XX.tgz --no-check-certificate
tar -zvf Python-3.6.tgz
rm -rf Python-3.6.tgz
cd Python-3.6
./configure --prefix=/opt/python3.6 --enable-shared
make
make altinstall

Just ignore the path and all.

Now when I am installing the django framework I am getting below error.
Exception:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 365, in run
strip_file_prefix=options.strip_file_prefix,
File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 789, in install
**kwargs
File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 854, in install

Its looking for Python site_packages in /usr/lib/python3.6 whereas it should look in /opt/python3.6/lib/python3.6/site_packages , any idea who to change that ?

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.