Installation issue while installing ParlAI (Blenderbot2) - python-3.x

need your help with an installation issue.
I am running a Ubuntu 20.4 machine and trying to install BlederBot2.
https://github.com/facebookresearch/ParlAIe
Using the following commands
pip install parlai
cd ~/ParlAI; python setup.py develop
It starts to try install but the I get the following message
ERROR: markdown 3.3.6 has requirement importlib-metadata>=4.4; python_version < "3.10",
but you'll have importlib-metadata 4.2.0 which is incompatible.
I am very new to Python and would appreciate your help in understanding how this can be solved.

i'm having the exact same issue. But, first, it appears parlAI doesn't support python 3.10, you have to look for a 3.9 or 3.8 version. Then, I'm force trying to get the right version of importlib-metadata by using:
pip install importlib-metadata==4.4
You can see which version best suits you, but! don't forget to downgrade your python first.
I just got the solution. Maybe this works for you too:
## First, in order to change your python version, use conda.
## If you don't know what it is, I highly recommend you to
## search it. Well, the code:
conda create -n my_env python=3.8 ## Downgrade the python just for the project
conda activate my_env
cd ~/.conda/envs/my_env
git clone https://github.com/facebookresearch/ParlAI.git
cd ParlAI
pip install -r requirements.txt
python3 setup.py develop

Related

How to install libdoc2testbench on Ubuntu

libdoc2testbench is a tool of Robot Framework which supports importing test results to imbus testbench. Due to Robot Framework documentation, it is to be installed by
pip install robotframework-libdoc2testbench
I want to install it on Ubuntu 18.04; there I get the error:
Could not find a version that satisfies the requirement robotframework-libdoc2testbench (from versions: )
No matching distribution found for robotframework-libdoc2testbench
Best regards
Gerhard
You are probably calling pip from Python 2.7.
Make sure you use Python 3, for example with:
python3 -m pip install robotframework-libdoc2testbench
EDIT: You can download the .wheel or source tar from pypi.org and install with pip pointing to it (and then if needed, download other required packages).
However the solution to your problem is the Python version. From the project page, we see it needs Python 3.7.

How to install tensorflow 1.15.0 in Ubuntu server 18.04

I am using Azure to create an Ubuntu server 18.04. The python3 default version in this VM is 3.6.9. I tried to install python3-pip, then install Tensorflow version 1.15.0 by command: sudo pip3 install Tensorflow==1.15.0.
However I got this error: No matching distribution found for tensorflow==1.15.0
I really don't know how to fix it. On my Windows PC, I got the same error while using python3.7, then I change to use python3.6.5 and everythings is fine. So that I think maybe I should try to install python 3.6.5 on Ubuntu VM. But again, this time, I can't install correctly python 3.6.5 on my Ubuntu server.
Can you please help me to fix it. I am just a newbie and honestly, I am not really good with Ubuntu.
Thank you so much.
I had the same issue.
A simple upgrade of pip to the latest version by:
sudo -H pip3 install --upgrade pip
sudo -H pip2 install --upgrade pip
solved the problem for me. Checkout https://askubuntu.com/questions/712339/how-to-upgrade-pip-to-latest for details how to upgrade pip.
After checking it seems the pip3 version shipped with Ubuntu defaults to pip 9.0.1. However, this version seems to supports only up to Tensorflow 1.14.
I would also strongly suggest to use virtual environments like Anaconda in order not to mess up your system python.
E.g.: https://docs.anaconda.com/anaconda/install/linux/
These are the list of files for TensorFlow 1.15
This command would work:
pip3 install tensorflow==1.15.0
I do see the manylinux wheel file for Ubuntu.
What CPU model and pip version are you using?
Debugging:
pip3 -v install tensorflow==1.15.0 | grep Found | more
Can help you see which platform and tags pip3 is trying to find in wheel files.
In the past I also have seen issue with pip default version (9.0.1), make sure you are running a recent version (e.g. pip-20.0.2):
apt install python3-pip && pip3 install --upgrade pip

conda_env package is not available upon downgrading Python version to 3.6

I'm trying to create a Docker image with Conda and Python 3.6 installed. I have installed Anaconda 3 with the default Python 3.7. Then I used the following command to downgrade to Python 3.6:
conda install -y python=3.6
This results in Python 3.6 successfully installing, but when I subsequently execute conda --version, it gives me the error
'conda' module not found
I found that under python3.6/site-packages folder there are no Conda-related packages and instead all these packages are found under python3.7/site-packages.
It used to work before. Is there a way to get conda packaged under python3.6 folder?
Srikanth,
You should always try creating a new environment when you are working with some old version of any library.
conda create -n myenv python=3.4
If you want to install specific packages in this environment, you can use
conda install -n myenv tensorflow
Refer to this documentation for more information:
docs.conda.io

How to install library

I am a little bit confused....
I installed anaconda on my computer (I have windows 10).
Normally, when I want to install a package I simply do "pip install package_name" or "conda install package_name" and it is done.
First question: what is the difference between pip and conda?
Now I tried to install xgboost and it was really complicated I tried lot of things nothings worked until I install something called miniconda.
There it works but now, when I do "conda install package_name" it install it in miniconda3/lib/site _package and I have to copy/paste it in Anaconda3/lib/site_package if I want it to work.
Second question: how can I ask to the computer that "conda install
package_name" install it directly in anaconda3 and not miniconda3?
Finally I tried to install the package "surprise" for recommended systems. Both "pip install" or "conda install" failed.
I went in github and got the file "surprise" from https://github.com/NicolasHug/Surprise
I tried to copy it in Anaconda3/lib/site_package but it doesn't work.
When I do from surprise import Reader I did not get the error "no module name surprise" anymore but I get "cannot import name 'Reader'"
Last question: how can I make it work? I think I have to build it but
I do not now how...
Thank you in advance for anyone that can explain all this for me :-)
Similarly to you, I had issues installing the surprise package.
I tried both pip install surprise and conda install surprise unsuccessfully.
conda install -c conda-forge scikit-surprise
conda install -c conda-forge/label/gcc7 scikit-surprise
conda install -c conda-forge/label/cf201901 scikit-surprise
I found those on the anconda website and the first one worked for me.
Hopefully this would help you as well
pip vs conda
pip is a package manager that facilitates installation, upgrade,
and uninstallation of python packages. It also works with virtual python environments.
conda is a package manager for any software (installation, upgrade and uninstallation).
It also works with virtual system environments.
Conda is a packaging tool and installr that aims to do more than what pip does;
handle library dependencies outside of the Python packages as well as the Python packages themselves.
Conda also creates a virtual environment, like virtualenv does.
For more see here
Anaconda vs miniconda
The open source version of Anaconda is an easy-to-install
high performance Python and R distribution with a package manager,
environment manager and collection of 720+ open source packages.
It also comes with the options to install RStudio.
The "lite" version of Anaconda without the collection of 720 packages.
The downside is that you need to type in command line commands,
"conda install PACKAGENAME"
And Last
To install this package with conda run:
conda install -c anaconda py-xgboost=0.60
Update for surprise
The easiest way is to use pip (you'll need numpy):
$ pip install numpy
$ pip install scikit-surprise
Or you can clone the repo and build the source (you'll need Cython and numpy):
$ git clone https://github.com/NicolasHug/surprise.git
$ python setup.py install

Install pybox2d for python 3.6 with conda 4.3.21

i want to play with the lunar lander env from OpenAI gym.
In order to run this code I need to install Box2d, this is where my problems arise.
I am using ubuntu 16.04 with conda 4.3.21 and python 3.6.
When I tried to run the environment I received the error: ModuleNotFoundError: No module named '_Box2D'
So I tried the direct install of pybox2d:
https://github.com/pybox2d/pybox2d/blob/master/INSTALL.md
which yielded the same error message.
Then I tried to install from GitHub following the way outlined in https://github.com/cbfinn/gps/issues/34
$git clone https://github.com/pybox2d/pybox2d pybox2d_dev
$cd pybox2d_dev
$python setup.py build
$sudo python setup.py install
If I run this (in root environment which has python 3 or another new created environment with python 3) i get the result:
a lot of processing logs
Processing Box2D-2.3.2-py2.7-linux-x86_64.egg
creating /usr/local/lib/python2.7/dist-packages/Box2D-2.3.2-py2.7-linux-x86_64.egg
Extracting Box2D-2.3.2-py2.7-linux-x86_64.egg to /usr/local/lib/python2.7/dist-packages
Adding Box2D 2.3.2 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/Box2D-2.3.2-py2.7-linux-x86_64.egg
Processing dependencies for Box2D==2.3.2
Finished processing dependencies for Box2D==2.3.2
So pybox2d is installed into the lib of the standard python 2 of ubuntu despite being in a python 3 conda environment.
So, I am looking for ways to install the pybox2d package for python 3 with conda 4.3.21
Installing Box2D from pip led me to the error described here when I tried to import it. Here's what worked for me on Python 3.6, as suggested in that GitHub issue:
conda install swig # needed to build Box2D in the pip install
pip install box2d-py # a repackaged version of pybox2d
Hey this question looks quite old but it seems no one really put the right answer in any where so just write this.
Follow the below two lines on your linux command:
$ sudo apt-get install build-essential python-dev swig python-pygame
$ pip install Box2D
---------Below is unnecessary details --------
Many wants to run Box2D based gym but it is sth you have to install by yourself like Mujoco series gym envs.
Many uses python 3.6 but the easiest way of installing Box2D, which is
$ conda install -c kne pybox2d
doesn't work cuz pybox2d has been maintained til py3.5
But directly doing
$ pip install Box2D
does not solve the issue. The error comes from swig given its error msg, but it's actually not.
$ sudo apt-get install build-essential python-dev swig python-pygame
This line always solve everything in one go.
I have been doing research based on Box2D envs but still foget this everytime I install this in a new env, so this is for me as well lol
Contribute: https://github.com/jonasschneider/box2d-py/blob/master/INSTALL.md
Btw, do not forget to double-check whether it is properly install.
In linux command
$ python --version
python 3.6. sthsth
$ python
>>> import numpy as np
>>> import gym
>>> env = gym.make('BipedalWalker-v2')
# If it does not give you error, then it's done!
You need to activate your environment:
source activate my_env_name
Then prompt changes to:
(my_env_name)
Now, install with pip and without sudo:
pip install pybox2d
sudo apt-get install swig
pip install pybox2d
Installing this way worked for me (also in a virtual env):
pip install box2d-py==2.3.8
I am running gym v 0.17.3.

Resources