• Register
0 votes
467 views

I have python 3 and python 2.7 installed in my system.

I am a newbee and I tried to run file :

~/usr/bin/env python 2.7 

But when I try to run the file it give me an error :

~/usr/bin/env python 2.7 No such file or directory

How can I check my default python version?

How can I run the file?

How to run the file without changing my default python version?

10 7 2
6,060 points

1 Answer

0 votes

You can create an alias to 2.7 as 3  :

sudo ln -s /usr/bin/python2.7 /usr/bin/python3

To check your default python version use the command:

python --version

You may check your python executable, versus the location of lib site-packages.

Your site-packages should be in the directory:

~/usr/lib/python2.7/site-packages

And your executable could be in the directory:

~/usr/bin

To check where it is finding the executables run the command:

which python
which python2.7
which pythohn3

 

11 6 4
34,950 points

Related questions

0 votes
1 answer 4 views
4 views
I'm trying to install spaCy using pip install spacy but I'm getting the following error .. I have VS 2015 installed, and I have the following Python install .. 3.5.2 |Anaconda 2.5.0 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 ... others. This is not a unique problem to this specific library but more generally anytime I try to install Python libraries that need C to build on Windows.
asked Oct 24 psandprop 2.4k points
0 votes
1 answer 20 views
20 views
I am setting up a django project and i am using python for this. I heard that the best way to this is by setting up a virtual environment. I installed my virtual environment by typing the command in my command promp by using: pip install virtualenvwrappwer-win But when I ... environment I can not start my project. I am new In django if anyone know the solution please help me to set up my project.
asked Mar 9 LizzyM 6.1k points