Server-side configuration file py python runtime environment and run

Copyright: welcome the exchange of learning, please indicate the source. https://blog.csdn.net/qq_23869697/article/details/89484123

Configuration python environment

I'm just here to configure the environment anaconda, python version need to pay attention when installing anaconda.
At present, many library support for python3.7 is not enough, still choose to version 3.6.
anaconda anaconda's official website for the download link is built python3.7.
Each version can be found anaconda release from the following website: https://repo.continuum.io/archive/
installation tutorial lot, you can reference this blog , or this blog .

Install the required packages

According to the package runs py files needed to use conda install.

Run py file

Switch to the directory python files, to run the script file permissions: chmod 755 ./*.py
execute the file:python ./test.py

If at the beginning of the script contents we have been given similar comments as follows: #!/usr/bin/env pythonor #!/usr/bin/python
switch to a python file directory run directly: test.py

For footnotes head #!/usr/bin/pythonor #!/usr/bin/env python
#!/usr/bin/pythontell the system which compiler to execute the current file. Here is a python linux comes with python, but it may not be suitable version of the code we write current.
So there #!/usr/bin/env python, here set up their own environment, with a custom environment inside the python executable file.

Guess you like

Origin blog.csdn.net/qq_23869697/article/details/89484123
Recommended