RuntimeError: Python version >= 3.5 required while installing the python libraries

Viewed 1655

I am using a virtual environment. In that I am having a python version 3.7.0

virtualenv --python=python3.7 .env

Now, whenever I am trying to install any library over there ,it is giving me this error

Downloading/unpacking scikit-learn==0.20.2
  Running setup.py (path:/tmp/pycharm-packaging421/scikit-learn/setup.py) egg_info for package scikit-learn
    Partial import of sklearn during the build process.

Requirement already satisfied (use --upgrade to upgrade): numpy>=1.8.2 in /usr/local/lib/python3.4/dist-packages (from scikit-learn==0.20.2)
Downloading/unpacking scipy>=0.13.3 (from scikit-learn==0.20.2)
  Running setup.py (path:/tmp/pycharm-packaging421/scipy/setup.py) egg_info for package scipy
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pycharm-packaging421/scipy/setup.py", line 31, in <module>
        raise RuntimeError("Python version >= 3.5 required.")
    RuntimeError: Python version >= 3.5 required.
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pycharm-packaging421/scipy/setup.py", line 31, in <module>

    raise RuntimeError("Python version >= 3.5 required.")

RuntimeError: Python version >= 3.5 required.

can any one help me with this ?

1 Answers

To use virtualenv in older version of python3 use this method.

Create: python3 -m venv .venv

Activate: source .venv/bin/activate

Exit: deactivate

I test it on Python 3.4.2 in Debian 8.11

Related