简体   繁体   中英

Install robot framework on python3 not python2

I have python3 pre-installed in fedora, somehow python2 was installed later. After using

pip install robotframework

robot was installed successfully, but it was installed in python 2.7/site-packages.

Is there any way to install and use it in python3? Or, is it possible to uninstall python2, and re-install robot framework on python3?

Thanks.

Try this command It may help you in my case it works!

pip3 install robotframework 

If you are using proxy server then use this command

pip3 --proxy <host>:<port> install robotframework

Example

pip3 --proxy 12.3.105.200:8080 install robotframework

And you can uninstall pre-installed by using this

pip uninstall robotframework

You can use below commands to install robot framework for specific python version if you had multiple python version installed,

python -m pip install robotframework   #python 2
python3 -m pip install robotframework  #python 3 

Robotframework has versions for both python 2 and 3, so this is definitely an issue of managing your python environment.

To avoid issues like this in the future, I strongly urge you to use virtual environments .

In a nutshell, you can solve this problem by doing

pip install virtualenv
virtualenv -p python3 venv
source venv/bin/activate
pip install robotframework

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM