The 'importlib-resources>=1.0' distribution was not found and is required by virtualenv - python-venv

I am a newbie in python using mac. I encountered this error when
i installed venv in a project directory. I am using mac and python 3.9 insallted.
what is the solution?
The 'importlib-resources>=1.0' distribution was not found and is required by virtualenv

Are you getting this error while trying to create a new virtual environment using the following command?
virtualenv virtualenv_name
If so, try the following
python3 -m virtualenv virtualenv_name

Related

RASA : ModuleNotFoundError: No module named 'wikipedia'

I'm learning to use rasa language. To diversify the answers of the goal I decided to use the Wikipedia api. To create my working environment I used anaconda with the following commands:
conda create --name rasaWiki python == 3.7.6
conda activate rasaWiki
pip install rasa
pip install wikipedia
In the action.py file, when I try to import 'wikipedia', and launch the server with the command: rasa run actions I get the error:
ModuleNotFoundError: No module named wikipedia
However, I can compile other python programs that use the wikipedia package with the python command python 'nameOfTheFile.py'.
I managed to solve the problem. I work under windows, I use anaconda prompt 3. When I was running the rasa run actions command, I was in the environment (base). The wikipedia package I had installed is in the rasaWiki environment. So I installed Wikipedia with the command pip install wikipedia in the (base) environment, which solved the problem.

ModuleNotFoundError: No module name 'Cython'

I am trying to install pandas module on PyCharm. When i try to install it it gave me this error: "ModuleNotFoundError: No module name 'Cython' " (Screen: https://prnt.sc/qafwcy)
So i went on the CMD to try to install the Cython package with this command: py -m pip install Cython , which gave me an other error: "The script, f2py.exe is install in 'C:\xxx.xxxx, which is not a PATH. (Screen: https://prnt.sc/qafvx3)
Does anyone had the same problem and know how to fix it?
Thank you
Pycharm uses a virtual environment - one separate from your python install on your computer. This is to isolate your development environment from the one you would use on your computer.
Enter your pip commands here instead:

Can't install Rasa on Ubuntu 18.04 + Python 3.7.5?

I have succeed to install Rasa NLU on my Win 10 with python 3.7 but couldn't do this on Ubuntu 18.04.
Please help.
Here is the error I get:
pip3 install rasa-x --extra-index-url https://pypi.rasa.com/simple
Could not find a version that satisfies the requirement
tensorflow~=1.15.0 (from rasa~=1.5.1->rasa-x) (from versions:
1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1) No matching distribution found for tensorflow~=1.15.0 (from rasa~=1.5.1->rasa-x)
Please advise what is the difference to my Win10 machine?
Please advise how can I install it.
I had followed these following steps and it's working fine for me for ubuntu 18.04 + Python3
Firstly create directory name of your choice and get inside of it
mkdir rasaprojects #directory name of your choice in place of rasaprojects
cd rasaprojects #get inside that directory
Now create virtual environment of python3
virtualenv rasaenv -p python3 #write your environment name instead of rasaenv
Now activate the environment
source rasaenv/bin/activate
Now you are good to go with rasa installation
pip3 install rasa
Updating your pip version should solve the issue. I believe TensorFlow and your current pip version don't go well together.
Do this:
Download pip installer python script from here.
Run it using python get-pip.py
Another thing is that TensorFlow was not supported by python3.7 untill recently. So if the first solution doesn't work you can try downgrading python to python3.6
Upgrade pip before instaling rasa.
pip3 install --upgrade pip

I am trying to simply connect to the ibapi (Interactive Brokers API), but I am having some technical troubles with Flask

I am trying to simply connect to the ibapi (Interactive Brokers API), but I am having some technical troubles with Python 3.7 .
What I did so far:
I installed the latest version for Windows 10 of the API
I ran C:\TWS API\source\pythonclient and run python setup.py install
I got:
ModuleNotFoundError: No module named 'ibapi'
when I try to import it
What I am doing wrong here and how can I fix this simple error?
My flask project is created in a virtual env named Ibconnect ( (IBconnect) C:\Users\Admin\dev\IBconnect> on the command Windows ) and I think that I have to install the python client here but I don't know how to do it.
Please try to use Anaconda - Spyder. In Anaconda prompt (just activates the conda environment) and navigate to the dir C:\TWS API\source\pythonclient and run python setup.py install

Error installing matplotlib in a virtual environment python 2.7

I have been trying to install matplotlib in a virtual environment using pip.
after working on the virtual environment I tried:
$pip install matplotlib
but I get the error:
unable to execute 'c++' : No such file or directory
error : command 'c++' failed with exit status 1
------------------------------------------
Cleaning up
I am on ubuntu 14.04 and matplotlib works well for me when not using virtualenv, but I would like to have it in a virtualenv for separate projects that I have.
any suggestions?
Solved this problem by just upgrading pip, it seems there was an issue of version 1.5.4 which was installed when creating virtualenv.
$ pip install --upgrade pip
then installed matplotlib using pip
$pip install matplotlib