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,060 points

edited Dec 17, 2018 by Anirudh 150 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,500 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,700 points
1,099 views
+4 votes
7 answers
+2 votes
11 answers

How to print array/ list without brackets in python?

name=["a","b","c"] print (', '.join(name)) It will simply take all ...READ MORE

answered Apr 18, 2018 in Python by aayushi
• 750 points
16,768 views
+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,160 points
104 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 135 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,500 points
3,737 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,500 points

edited Dec 18, 2018 by Nymeria 421 views