[LINUX] Python environment construction

OS Windows10 Pro Vagrant 2.2.14 Ubuntu 16.04.4 LTS

I want to manage it with Docker in the future, so when I try to install Python, pip, and numpy, an error occurs.


python3 -m pip install numpy Collecting numpy Using cached https://files.pythonhosted.org/packages/51/60/3f0fe5b7675a461d96b9d6729beecd3532565743278a9c3fe6dd09697fa7/numpy-1.19.5.zip Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-ayy5xg9l/numpy/setup.py", line 68 f"NumPy {VERSION} may not yet support Python " ^ SyntaxError: invalid syntax

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ayy5xg9l/numpy/ You are using pip version 8.1.1, however version 20.3.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

Investigate Upgraded pip.

sudo pip install --upgrade pip The directory '/home/vagrant/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/vagrant/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Collecting pip Downloading https://files.pythonhosted.org/packages/54/eb/4a3642e971f404d69d4f6fa3885559d67562801b99d7592487f1ecc4e017/pip-20.3.3-py2.py3-none-any.whl (1.5MB) 100% |████████████████████████████████| 1.5MB 110kB/s Installing collected packages: pip Found existing installation: pip 8.1.1 Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr Successfully installed pip-20.3.3

Install numpy again
agrant@vagrant-ubuntu-trusty-64:~$ pip install numpy
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting numpy
  Downloading numpy-1.16.6-cp27-cp27mu-manylinux1_x86_64.whl (17.0 MB)
     |████████████████████████████████| 17.0 MB 116 kB/s
Installing collected packages: numpy
  WARNING: The scripts f2py, f2py2 and f2py2.7 are installed in '/home/vagrant/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.


```
 I was able to install it successfully.



Recommended Posts

Python environment construction
Environment construction (python)
python environment construction
Python --Environment construction
Python environment construction
python environment construction
python windows environment construction
homebrew python environment construction
Python development environment construction
python2.7 development environment construction
Mac environment construction Python
Python environment construction @ Win7
Python + Anaconda + Pycharm environment construction
Python environment construction (Windows10 + Emacs)
CI environment construction ~ Python edition ~
Python environment construction For Mac
Anaconda3 python environment construction procedure
Python3 environment construction (for beginners)
Python environment construction and TensorFlow
Python environment construction under Windows7 environment
[MEMO] [Development environment construction] Python
Environment construction of python2 & 3 (OSX)
Django environment construction
Environment construction of python and opencv
Python environment construction memo on Windows 10
DeepIE3D environment construction
Emacs-based environment construction
Linux environment construction
Anaconda python environment construction on Windows 10
Python + Unity Reinforcement learning environment construction
python environment settings
python windows environment
I checked Mac Python environment construction
Python environment construction memo on Mac
django environment construction
Python environment construction (pyenv, anaconda, tensorflow)
[Python3] Development environment construction << Windows edition >>
CodeIgniter environment construction
Python development environment construction on macOS
Python environment construction (pyenv + poetry + pipx)
Environment construction of python3.8 on mac
Python3 environment construction with pyenv-virtualenv (CentOS 7.3)
Python3 TensorFlow for Mac environment construction
Emacs Python development environment construction memo
pytorch @ python3.8 environment construction with pipenv
Golang environment construction
[docker] python3.5 + numpy + matplotlib environment construction
Python3.6 environment construction (using Win environment Anaconda)
OpenCV3 & Python3 environment construction on Ubuntu
Word2vec environment construction
[Ubuntu 18.04] Python environment construction with pyenv + pipenv
Python (anaconda) development environment construction procedure (SpringToolsSuites) _2020.4
Python project environment construction procedure (for windows)
[Python] Road to snake charmer (1) Environment construction
Python3 + venv + VSCode + macOS development environment construction
VScode environment construction (Windows10, Python, C ++, C, Git)
Environment construction procedure: Ubuntu + Apache2 + Python + Pyramid
Python and machine learning environment construction (macOS)
Let's get along with Python # 0 (Environment construction)
Windows + gVim + Poetry python development environment construction
[Python] Get environment variables