No module named 'bs4' in Virtual Env - beautifulsoup

I'm working in Python 3.4 When I run my Python file in the virtual env, it gives an ImportError: No module named 'bs4' even though I installed the module in the virtual env. Any help will be appreciated.

Did you try using pip install beautifulsoup4 in your virtual env? The package's name on pip is beautofulsoup4, not bs4.

Related

Problems with virtualenv and pandas

I created a virtual env and that was where I installed the pandas and numpy libraries, at the end of the installation I closed the virtual env and realized that it was also installed globally on the computer and I don't understand why this happens
to be installed only in the virtual environment and not global
Is there a way to install it only in the environment or will it always be installed globally?

install "pip undetected-chromedriver" for selenium python

I'm trying to make an autofiller using selenium, but it couldn't be done. so I decided to use undetected chromedriver to finish the automation.
I am having some difficulty here to import the undetected-chromedriver.
I already downloaded it by inputting the command line: pip install undetected-chromedriver
But when I put the import undetected_chromedriver as uc, the complier doesn't recognize it.
Below is the Error message after trying to import undetected-chromedriver:
import undetected_chromedriver as uc
ModuleNotFoundError: No module named 'undetected_chromedriver'
Use the following command to check if the undetected_chromedriver package is in the list
pip list
or
pip3 list
Try the following
# navigate into the project directory with your python script
cd presearch
# create virtual environment
python3 -m venv venv
# activate the virtual environment
source venv/bin/activate
# install required pip packages
pip3 install undetected-chromedriver
If you have multiple python versions installed, you might check if you actually installed it in the right one.

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:

Running tensorflow in ipython

tensorflow works using python in a virtualenv I created, but tensorflow doesn't work in the same virtualenv with ipython. This is the error I get:
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name mock was given, but was not able to be found.
I have tried installing ipython within the virtual environment. This is the message I get:
Requirement already satisfied: ipython in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
If I try to uninstall ipython within the virtual environment. I get this message:
Not uninstalling ipython at /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Any ideas on how to get this to work? I don't know how to force the install of ipython to be inside the virtual environment. I've tried deleting the virtual environment and making a new one from scratch, but I get the same error.
I think I figured out the problem. pip was pointing to /Library/Frameworks/Python.framework/Versions/3.4/bin/pip
My ipython was pointing to /opt/local/bin/ipython
I re-installed tensorflow within my virtual environment by calling /opt/local/bin/pip-2.7 install --upgrade tensorflow
Now I can use tensorflow within ipython.

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