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

edited Dec 17, 2018 by Anirudh 4,712 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,560 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
15,284 views
+4 votes
7 answers
+1 vote
12 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
• 58,020 points
1,584 views
0 votes
2 answers
+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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,443 views
0 votes
1 answer
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,560 points
34,455 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,560 points

edited Dec 18, 2018 by Nymeria 6,852 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP