Python Forum
Can I make virtualenv (and/or uwsgi) use python 3.6 instead of 2.7?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I make virtualenv (and/or uwsgi) use python 3.6 instead of 2.7?
#5
Wait I'm still having the same problem; wsgi is still using 2.7.15

bog@bog-Lenovo-Product:~/myapp/myappdjango/myappdjango$ uwsgi --socket mysite.sock --wsgi-file test.py --chmod-socket=666
*** Starting uWSGI 2.0.18 (64bit) on [Sat Nov  9 00:29:29 2019] ***
compiled with version: 7.4.0 on 15 May 2019 18:53:37
os: Linux-4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019
nodename: bog-Lenovo-Product
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /home/bog/myapp/myappdjango/myappdjango
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 63335
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address mysite.sock fd 3
Python version: 2.7.15+ (default, Oct  7 2019, 17:39:04)  [GCC 7.4.0]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x564f80b56930
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72904 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x564f80b56930 pid: 32599 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 32599, cores: 1)
But in the venv when I check the python version I get:

(myapp) bog@bog-Lenovo-Product:~/myapp$ python -V
Python 3.6.8
I can't figure out where in the wsgi settings to change that; this is the config file right?

(myapp) bog@bog-Lenovo-Product:~/myapp/myappdjango$ more ./uwsgi_params 

uwsgi_param  QUERY_STRING       $query_string;
uwsgi_param  REQUEST_METHOD     $request_method;
uwsgi_param  CONTENT_TYPE       $content_type;
uwsgi_param  CONTENT_LENGTH     $content_length;

uwsgi_param  REQUEST_URI        $request_uri;
uwsgi_param  PATH_INFO          $document_uri;
uwsgi_param  DOCUMENT_ROOT      $document_root;
uwsgi_param  SERVER_PROTOCOL    $server_protocol;
uwsgi_param  REQUEST_SCHEME     $scheme;
uwsgi_param  HTTPS              $https if_not_empty;

uwsgi_param  REMOTE_ADDR        $remote_addr;
uwsgi_param  REMOTE_PORT        $remote_port;
uwsgi_param  SERVER_PORT        $server_port;
uwsgi_param  SERVER_NAME        $server_name;
None of that looks like someplace to change python versions. So where is it set on using 2.7?

thanks
Reply


Messages In This Thread
RE: Can I make virtualenv (and/or uwsgi) use python 3.6 instead of 2.7? - by david503 - Nov-09-2019, 05:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  What do I put in the "module" argument in a uwsgi.ini file? david503 0 2,547 Nov-10-2019, 04:00 AM
Last Post: david503
  How to point a subdomain to run applications using virtualenv on ec2 (AWS) JohnnyCoffee 0 1,419 Oct-02-2019, 12:43 AM
Last Post: JohnnyCoffee

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020