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

edited Dec 17, 2018 by Anirudh 67 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
494 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
11,686 views
+1 vote
1 answer
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
19 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
2,347 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 249 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.