Reputation: 389
System A has both Python 2.7 and Python 3.4 installed. System B has both Python 2.7 and Python 3.5 installed.
I have at top of Python script:
#!/usr/bin/env python3.5
The reason being that python3 compiler must be used. I want to move it between machines but this will fail now.
Upvotes: 0
Views: 103
Reputation: 1638
If your are set on using #!/usr/bin/env python3.5
, you could create a symbolic link to the python3.4 version (called python3.5) and then reference that in your script. So both environments could use the directive #!/usr/bin/env python3.5
. Of course, please add a comment somewhere that this is a symbolic link so people are aware of this environment situation.
In fact, I think the python
in #!/usr/bin/env python
solution is a symbolic link.
Upvotes: 0