Try to install pymodbus3 but can't find Python 3.0 or later

908 views Asked by At

I have installed Python 2.7, 3.5.2 and 3.6. I try to install pymodbus3 for Python 3.5.2. When I run

pip install -U pymodbus3 --trusted-host pypi.python.org

I get the error:

 Collecting pymodbus3
 Downloading pymodbus3-1.0.0.tar.gz (80kB)
 100% |################################| 81kB 6.8MB/s
 Complete output from command python setup.py egg_info:
 You need python 3.0 or later to run this script!

I also added Python 3.5.2 to the Python path. What is the next step for analyse my problem?

EDIT:

pip --version

gives me

pip 9.0.1 from C:\Python27\Lib\site-packages (python 2.7)

So I assume that I have to use pip for python3?

1

There are 1 answers

5
Mike Müller On BEST ANSWER

Use pip3:

pip3 install -U pymodbus3 --trusted-host pypi.python.org

pip is for Python 2 and pip3 for Python 3.

You can find out where pip is located with.

On Windows:

where pip

or

where pip3

on Unix/Mac:

which pip

or:

which pip3

The argument -a shows you all instances. You can choose one explicitly:

/path/to/my/pip/pip3

On Windows the path might not be set.

where python

should give you the Python executable.

In the same directory should be a sub-directory Scripts that contains pip3. Add this to your PATH.

You can try first with an absolute path:

C:\path\to\python\Scripts\pip3