[web2py] Re: python2 and python3 in 1 machine
You are right , sym-link is simple example. In multi-python multi-web2py envs I use to full path to python (centos 7 /etc/systemd/syste/gunicorn.service) --- [Unit] Description=Gunicorn instance to serve web2py After=network.target [Service] User=w2p Group=w2p WorkingDirectory=/home/w2p/web2py #Environment="PATH=/home/w2p/.conda/envs/lic/bin/:$PATH" #ExecStart=/home/w2p/.conda/envs/lic/bin/gunicorn --workers 24 --timeout=90 --graceful-timeout=10 --bind 127.0.0.1:8005 wsgihandler:application ExecStart=/home/w2p/.conda/envs/lic/bin/gunicorn --workers 20 --timeout=90 --graceful-timeout=10 --reload --bind unix:/home/w2p/var/gunicorn.sock wsgihandler:application Restart=always [Install] WantedBy=multi-user.target -- /home/w2p/.conda/envs/lic/bin/gunicorn --- #!/home/w2p/.conda/envs/lic/bin/python if __name__ == '__main__': import sys from gunicorn.app.wsgiapp import run sys.exit(run()) also, I use to pip with full path or with sym-link вторник, 8 мая 2018 г., 3:11:37 UTC+3 пользователь 黄祥 написал: > > plan to test web2py both python2 and python3 in 1 machine, any idea how to > do that in the safety way? > already googling found this: > > brew update > brew install python > brew install python3 > > any thought or comment? > > thx and best regards, > stifan > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: python2 and python3 in 1 machine
## miniconda on osx # Download and Install Package cd ~/Downloads curl -L -O -C - https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh bash Miniconda*.sh yes yes # Load New Path source ~/.bash_profile # Update Package conda update -n base conda # Create Environment conda create --name mypython3 python=3 conda create --name mypython2 python=2 # List Environment conda env list # Activate Environment source activate mypython3 source activate mypython2 # Deactivate Environment source deactivate *N.B.* - different when installed on ubuntu is on the ~/.bashrc and ~/.bash_profile - better to not create symbolic link, just use the environment created (activate and deactivate) best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: python2 and python3 in 1 machine
> > you missed > adduser pyuser > sudo su pyuser > yes, you are right, the step above was tested using root account and running smoothly, and as per your advice it's safest to do it using user privilege not root login. will try in osx soon, for the size of python 3 ampps in osx around 136mb, while in the ubuntu using miniconda python 3 is around 152mb and miniconda python 2 around 127 mb. not compared the pre installed python module on ampps yet while in miniconda is described explicit (the python module including the size and the path). thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: python2 and python3 in 1 machine
you missed adduser pyuser sudo su pyuser :( вторник, 8 мая 2018 г., 3:11:37 UTC+3 пользователь 黄祥 написал: > > plan to test web2py both python2 and python3 in 1 machine, any idea how to > do that in the safety way? > already googling found this: > > brew update > brew install python > brew install python3 > > any thought or comment? > > thx and best regards, > stifan > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: python2 and python3 in 1 machine
*# miniconda on ubuntu (around 50mb)* apt update apt install -y curl curl -L -O -C - https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda*.sh yes yes source ~/.bashrc conda update -n base conda y conda create --name mypython3 python=3 y ln -s ~/miniconda3/envs/mypython3/bin/python3 /bin/mypy3 conda create --name mypython2 python=2 y ln -s ~/miniconda3/envs/mypython2/bin/python2 /bin/mypy2 mypy3 -V mypy2 -V *# anaconda on ubuntu (around 500mb)* apt update apt install -y curl curl -L -O -C - https://repo.anaconda.com/archive/Anaconda3-5.1.0-Linux-x86_64.sh bash Anaconda*.sh yes yes no source ~/.bashrc conda update -n base conda y conda create --name mypython3 python=3 y ln -s ~/anaconda3/envs/mypython3/bin/python3 /bin/mypy3 conda create --name mypython2 python=2 y ln -s ~/anaconda3/envs/mypython2/bin/python2 /bin/mypy2 mypy3 -V mypy2 -V thx and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: python2 and python3 in 1 machine
use anaconda . 1 adduser pyuser 2 su pyuser 3 install anaconda https://conda.io/miniconda.htmlto ~/opt 4 conda create --name mypython3 python=3 ln -s ~/.conda/envs/mypython3/bin/python3 ~/bin/mypy3 5 conda create --name mypython2 python=2 ln -s ~/.conda/envs/mypython2/bin/python2 ~/bin/mypy2 вторник, 8 мая 2018 г., 3:11:37 UTC+3 пользователь 黄祥 написал: > > plan to test web2py both python2 and python3 in 1 machine, any idea how to > do that in the safety way? > already googling found this: > > brew update > brew install python > brew install python3 > > any thought or comment? > > thx and best regards, > stifan > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: python2 and python3 in 1 machine
objective is to installed another python that not affected the pre installed one by os ended with installed python 3.6 with ampps, add the ampps python path into path variable when using python 3 and remove ampps python path when using python 2 not doing the brew install python (v 2), because afraid to affected the pre installed one by os and not installed using brew either for python 3, because it will store in the path that i don't understand (not sure rather than using ampps, it will store under ampps folder) best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: python2 and python3 in 1 machine
You just install them both, as your instructions say. If you want to start wen2py in python2, just execute it with python: python web2py.py If you want to start web2py in Python 3, execute it with python3: python3 web2py.py This is how I do it in Linux, but I'm almost sure MacOS does it the same way. Windows is not as straightforward, but it can be done if you add these scripts to your PATH variable: PYTHON.CMD C:\Python\Python27-32\Python.exe %* PYTHON3.CMD C:\Python\Python36-32\Python.exe %* According to your installation, you might have to adjust where the Python .EXEs are located. On Monday, May 7, 2018 at 7:11:37 PM UTC-5, 黄祥 wrote: > > plan to test web2py both python2 and python3 in 1 machine, any idea how to > do that in the safety way? > already googling found this: > > brew update > brew install python > brew install python3 > > any thought or comment? > > thx and best regards, > stifan > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: python2 and python3 in 1 machine
Yes I'm using this way to run both py2 and py3 on the same machine Have 2 folders, one for py2 and one for py3. python2 ...path to py2 folder/web2py.py ...and do the same for py3. Works! On Tuesday, May 8, 2018 at 8:11:37 AM UTC+8, 黄祥 wrote: > > plan to test web2py both python2 and python3 in 1 machine, any idea how to > do that in the safety way? > already googling found this: > > brew update > brew install python > brew install python3 > > any thought or comment? > > thx and best regards, > stifan > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.