How to activate virtualenv in Python? Help!

0 votes

Running on Red Hat Linux with Python 2.5.2

Using recent versions of Virtualenv but could not activate it. I found that older versions work better with Python 2.6 or something. Help?

VE installation is fine:

[testboy@server6 ~]$ python virtualenv-1.6.4/virtualenv.py virtual

New python executable in virtual/bin/python
Installing setuptools............done.
Installing pip...............done.

Environment looks fine:

[testboy@server6 ~]$ cd virtual
[testboy@server6 ~/virtual]$ dir
bin  include  lib

Trying to activate it now:

[testboy@server6 ~/virtual]$ . bin/activate
/bin/.: Permission denied.

Checked chmod:

[testboy@server6 ~/virtual]$ cd bin
[testboy@server6 bin]$ ls -l
total 3160
-rw-r--r--    1 necrailk biz12        2130 Jan 30 11:38 activate
-rw-r--r--    1 necrailk biz12        1050 Jan 30 11:38 activate.csh
-rw-r--r--    1 necrailk biz12        2869 Jan 30 11:38 activate.fish
-rw-r--r-

There was a problem, hence changed:

[testboy@server6 bin]$ ls -l
total 3160
-rwxr--r--    1 necrailk biz12        2130 Jan 30 11:38 activate
-rw-r--r--    1 necrailk biz12        1050 Jan 30 11:38 activate.csh
-rw-r--r--    1 necrailk biz12        2869 Jan 30 11:38 activate.fish
-rw-r--r--    1 necrailk biz12        1005 Jan 30 11:38 activate_this.py
-rwxr-xr-x    1 necrailk biz

Trying to activate again:

[testboy@server6 ~/virtual]$ . bin/activate
/bin/.: Permission denied.

Nothing is working. I'd appreciate some help regarding this, thanks!

Nov 5, 2018 in Python by Anirudh
• 2,070 points

edited Dec 17, 2018 by Anirudh 378 views

1 answer to this question.

0 votes
One major issue I see is that you forgot to do source bin/activate where source is a executable name.

It is easy to think that manual is telling "execute this from root of the environment folder".

No need to make activate executable via chmod. Hope this solves your issue!
answered Nov 5, 2018 by Nymeria
• 3,520 points

edited Dec 17, 2018 by Nymeria

Related Questions In Python

+3 votes
5 answers

How to read multiple data files in python

Firstly we will import pandas to read ...READ MORE

answered Apr 6, 2018 in Python by DeepCoder786
• 1,720 points
3,043 views
+4 votes
7 answers
+2 votes
11 answers
+1 vote
1 answer

How to create plots using python matplotlib in IPython notebook?

I think you should try: I used %matplotlib inline in ...READ MORE

answered Aug 8, 2018 in Python by Priyaj
• 56,960 points
156 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 405 views
0 votes
1 answer

How to convert a Pandas GroupBy object to DataFrame in Python

g1 here is a DataFrame. It has a hierarchical index, ...READ MORE

answered Nov 12, 2018 in Python by Nymeria
• 3,520 points
9,206 views
0 votes
1 answer

How to get all related Django model objects in Python?

This actually gives you the property names ...READ MORE

answered Nov 14, 2018 in Python by Nymeria
• 3,520 points

edited Dec 18, 2018 by Nymeria 872 views