WebFaction
Community site: login faq

Hi, i want to set up a virtual environment for my django project with python3.5. in home/user/libs folder there are a lot of python versions including python 3.5. But connecting via ssh the default python is 2.7 I guess... I need a way to activate python 3.5 and setup virtualenv. Can someone help? ( with a detailed answer if possible )

asked 12 Jun '16, 22:28

burak k
137
accept rate: 0%


You can set up a virtualenv using the pyvenv-3.5 name_of_env command over an ssh session.

See the official python documentation for more info.

permanent link

answered 13 Jun '16, 06:29

iliasr ♦♦
2.1k14
accept rate: 35%

edited 13 Jun '16, 06:30

I got error : -bash: pyenv-3.5: command not found. I guess the default python is 2.7. How can i activate python 3?

(13 Jun '16, 08:21) burak k

The default is python2.7, but python 3 is installed and you should be able to load the interpreter using the python3 command. The pyvenv-3.5 command is also installed as part of the python3.5 package.

There's probably some issue with your account's PATH variable, if it is unable to find that command.

(13 Jun '16, 08:25) iliasr ♦♦

Is there a way i can get my PATH variable and set it?

(13 Jun '16, 08:28) burak k

You can see your PATH using the echo $PATH command.

Most users override the default PATH variable in either the ~/.bashrc or ~/.bash_profile files.

The pyvenv-3.5 command is located in /usr/local/bin/, so that directory should appear in your PATH list of directories.

(13 Jun '16, 08:32) iliasr ♦♦

I have /usr/local/sbin in PATH ? I do not know why sbin instead of bin...

(13 Jun '16, 08:42) burak k

Try editing that or add /usr/local/bin in your PATH and see if that helps.

(13 Jun '16, 09:01) iliasr ♦♦
showing 5 of 6 show 1 more comments
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×337

question asked: 12 Jun '16, 22:28

question was seen: 2,268 times

last updated: 13 Jun '16, 09:01

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM