[LINUX] Build a Python environment and transfer data to the server

Development environment

Build a Python environment on the server

First, log in to the server with the user account for which you want to build a Python environment. After that, execute the following command in your home directory.

$ git clone https://github.com/yyuu/pyenv.git .pyenv
$ mkdir .pyenv/shims .pyenv/versions
$ cd .pyenv/plugins
$ git clone https://github.com/yyuu/pyenv-virtualenv.git

After completing the above command, add the following program to **. Bashrc **.

export PYENV_ROOT=~/.pyenv
export PATH=~/.pyenv/shims:~/.pyenv/bin:/usr/local/bin:$PATH
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

After that, you can reflect the environment variables by executing the following command.

$ source .bashrc

Data transfer

To transfer the files in your local environment to the server, run the ** scp ** command. The usage of scp is as follows.

scp Path of the file you want to transfer on your local environment Username@Remote host name:Destination path

Let's take an example to make it easier to understand. Suppose each element is given in the specific example below. In that case, it will be as follows.

element Concrete example
I want to transfer on the local environment
File path
/usr/home/box/data.txt
User name chocolate
Remote host name apple
Destination path /home/chocolate
#When transferring files
scp /usr/home/box/data.txt chocolate@apple:/home/chocolate

#When transferring the entire folder
scp -r /usr/home/box chocolate@apple:/home/chocolate

Recommended Posts

Build a Python environment and transfer data to the server
Build a python environment to learn the theory and implementation of deep learning
I want to build a Python environment
ffmpeg-Build a python environment and split the video
Quickly build a python environment for deep learning and data science (Windows)
Build a Python environment offline
Build a python virtual environment with virtualenv and virtualenvwrapper
Build a python virtual environment with virtualenv and virtualenvwrapper
How to build a Python environment on amazon linux 2
Create a Django project and application in a Python virtual environment and start the server
[Python] How to create a local web server environment with SimpleHTTPServer and CGIHTTPServer
Build a Postfix mail server, start Python code triggered by mail reception, and post mail to Slack (local environment)
How to build a new python virtual environment on Ubuntu
How to build a beautiful Python environment on a new Mac and install Jupter Notebook
Build a python data analysis environment on Mac (El Capitan)
How to build a python2.7 series development environment with Vagrant
<Python> Build a dedicated server for Jupyter Notebook data analysis
Build a python3 environment on CentOS7
Build a python environment on CentOS 7.7 for your home server
Python --Read data from a numeric data file to find the covariance matrix, eigenvalues, and eigenvectors
[Sakura Rental Server] (For beginners) How to build an environment for Python, pyenv, and Flask. | For csh
How to build a LAMP environment using Vagrant and VirtulBox Note
Build and test a CI environment for multiple versions of Python
Build a Python environment on your Mac with Anaconda and PyCharm
The simplest way to build a Spleeter usage environment using Windows
How to build Python and Jupyter execution environment with VS Code
How to build a sphinx translation environment
Build Python3 and OpenCV environment on Ubuntu 18.04
Build a python environment on MacOS (Catallina)
Build a python virtual environment with pyenv
Compress python data and write to sqlite
Build a Python + OpenCV environment on Cloud9
Build a modern Python environment with Neovim
Add a Python virtual environment to VSCode
How to divide and process a data frame using the groupby function
After buying a new Mac, use pyenv + poetry to build a Python environment.
[Introduction to Python] What is the difference between a list and a tuple?
Migration from Python2 to Python3 (Python2 is rebuilt as a virtual environment and coexists)
Build a CentOS Linux 8 environment with Docker and start Apache HTTP Server
[Mac] Build a Python 3.x environment at the fastest speed using Docker
Try to build python and anaconda environment on Mac (by pyenv, conda)
[Development environment] How to create a data set close to the production DB
I tried to build a Mac Python development environment with pythonz + direnv
[python] Send the image captured from the webcam to the server and save it
Build Linux on a Windows environment. Steps to install Laradock and migrate
Build a lightweight server in Python and listen for Scratch 2 HTTP extensions
Send a message from Slack to a Python server
Introduction to Python Let's prepare the development environment
How to create a Python virtual environment (venv)
Building a python environment with virtualenv and direnv
Just add the python array to the json data
Simply build a Python 3 execution environment on Windows
Build a python environment with ansible on centos6
Build a Python environment on Mac (Mountain Lion)
[Python] How to read data from CIFAR-10 and CIFAR-100
[Python] Build a Django development environment with Docker
Create a python3 build environment with Sublime Text3
Build a Python development environment on your Mac
Build a simple Python virtual environment without pyenv
Build a virtual environment with pyenv and venv
Launch a web server with Python and Flask