Python 3.5: Error installing Beautifulsoup library - windows

I'm trying to install Beautifulsoup library from python 3.5 following the next steps:
Upgrade pip: python -m pip install --upgrade pip
Install setuptools python -m pip install -U pip setuptools
Install Beautifulsoup python -m pip install beautifulsoup
My operating system is Windows 10, 64 bit. And the result that I've got is this error:
Command "python setup.py egg_info" failed with error code 1 in C:\Users\JOSCAR~1\AppData\Local\Temp\pip-build-dgi2w24s\beautifulsoup\
Screenshot:
What am I doing wrong?

I have found the solution to my problem. I was trying to install it using this command:
python -m pip install beautifulsoup
And this is not correct. To install it correctly the comand is ...
python -m pip install beautifulsoup4

Related

pip installing matplotlib but while importing showing error message: "DLL load failed while importing _path: %1 is not a valid Win32 application."

Solve the following issue
tried different installation method like
pip, pip2, pip3
or
Update pip
python -m pip install -U pip
Install scikit-image
python -m pip install -U matplotlib

SyntaxError when pip install pip ( def read(rel_path: str))

when using pip I get the following warning:
$ pip install pip
Requirement already satisfied (use --upgrade to upgrade): pip in /usr/lib/python2.7/site-packages
You are using pip version 8.1.2, however version 22.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
So I follow the suggestion, but I get a SyntaxError:
$ pip install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/99/bb/696e256f4f445809f25efd4e4ce42ff99664dc089cafa1e097d5fec7fc33/pip-22.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-k03IN1/pip/setup.py", line 7
def read(rel_path: str) -> str:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-k03IN1/pip/
You are using pip version 8.1.2, however version 22.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
My default pip is not the one I want to be:
$ ~/anaconda3/bin/pip --version
pip 22.1 from /home/mdi0316/.local/lib/python3.8/site-packages/pip (python 3.8)
$ ~/anaconda3/bin/pip3 --version
pip 22.1 from /home/mdi0316/.local/lib/python3.8/site-packages/pip (python 3.8)
$ which pip
/usr/bin/pip
$ pip --version
pip 8.1.2 from /usr/lib/python2.7/site-packages (python 2.7)
$ echo $PATH
/home/mdi0316/bin:/home/mdi0316/anaconda3/envs/nagare_env/bin:/home/mdi0316/anaconda3/condabin:/home/mdi0316/anaconda3/envs/nagare_env/bin:/cm/shared/apps/TURBOMOLE/bin/em64t-unknown-linux-gnu_smp:/cm/shared/apps/TURBOMOLE/scripts:/cm/local/apps/cuda/libs/current/bin:/cm/shared/apps/cuda11.1/sdk/11.1.1/bin/x86_64/linux/release:/cm/shared/apps/cuda11.1/toolkit/11.1.1/bin:/cm/shared/apps/python3.8.7/bin:/cm/shared/apps/openmpi/gcc/64/4.0.5/bin:/cm/local/apps/gcc/8.2.0/bin:/cm/shared/apps/slurm/18.08.9/sbin:/cm/shared/apps/slurm/18.08.9/bin:/cm/local/apps/environment-modules/4.2.1/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/ibutils/bin:/sbin:/usr/sbin:/cm/local/apps/environment-modules/4.2.1/bin
I am within a personally created anaconda environment (nagare_env).
Yet, the default pip in in ~/usr
I also tried to install pip through pip3, but I could solve this neither way.
$ pip3 install --upgrade pip
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in ./.local/lib/python3.8/site-packages (22.1)
$ pip3 install --upgrade --trusted-host pypi.org --trusted-host files.pythonhosted.org pip
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in ./.local/lib/python3.8/site-packages (22.1)
any hint?
Thanks
Marco
I faced the same issue on my centos. Guess my pip file was corrupted. I installed it again and was working fine.
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
python get-pip.py
pip install --upgrade setuptools
"pip 21.0, in January 2021, removed Python 2 support, per pip’s Python 2 support policy.
you should change your pip version
from: https://pypi.org/project/pip/

How Install scikit-learn package on pypy?

create virtualenv -p pypy3 pypy3.
I had upgraded Pip so that I can install other packages:
pypy3 -m ensurepip
pypy3 -m pip install --upgrade pip setuptools wheel
PyPy 7.3.5 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux,
error: command 'gcc' failed with exit status 1
But it waits so long after run command:
pypy3 -m pip install scikit-learn
Please use conda-forge, they supply binary packages for many common libraries like scikit-learn:
$ conda create -c conda-forge -n pypy3.7 pypy
$ conda activate pypy3.7
(pypy3.7)$ conda install -c conda-forge scikit-learn

Why I can't pip install nltk on mac os?

I'm using mac os mojave, install python 2.7 and install pip using python get-pip.py, I already try those command to install pip :
pip install --upgrade pip
pip install nltk
and try
sudo python -m pip install --upgrade nltk
But also result to same error like in this image
Or here in text:
error in nltk setup command: 'install_requires' must be a string or
list of strings containing valid project/version requirement
specifiers; Expected version spec in singledispatch; python_version <
"3.4" at ; python_version < "3.4"
Is it because my python version (2.7) ? But in pip ntlk page it says also support 2.7
update:
pip install nltk success after running :
pip install --upgrade setuptools pip --user
Start with upgrading installation tools:
pip install --upgrade setuptools pip

Getting "ImportError: No Module named yaml" error

Computer: MacBook Pro mid 2012, running El Capitan 10.11.4
Python version 2.7.10
I've been trying to install ansible from source, and I've run these two commands (following the steps on ansibles documentation):
git clone git://github.com/ansible/ansible.git --recursive
cd ./ansible
and then ran this
source ./hacking/env-setup
I've also already installed these packages
sudo pip install paramiko PyYAML Jinja2 httplib2 six
However, if I try and run ansible by typing it in the terminal, I get the following error.
Traceback (most recent call last):
File "/Users/[myusr]/rock/ansible/bin/ansible", line 81, in <module>
from ansible.cli.adhoc import AdHocCLI as mycli
File "/Users/[myusr]/rock/ansible/lib/ansible/cli/__init__.py", line 27, in <module>
import yaml
ImportError: No module named yaml
What should be done here?
Do you have yaml module installed? If not, try installing yaml using the following command:
sudo pip install pyyaml
Had the same issue. Got past it using #FranMowinckel's answer.
First I typed:
pip --version
it outputted python 3. But, when I tried:
sudo python -m pip install pyyaml
I got an error saying:
Error: No module named pip
So, finally running:
sudo easy_install pip
everything worked fine.
Go back and run:
sudo python -m pip install pyyaml
(you may have to run this with all the other modules as well)
Now you should finally be able to run your initial command which failed.
For python 3.6 you can install it with
pip3 install pyyaml
if there is a problem in importing, do
pip3 uninstall pyyaml
and then install it again:
pip3 install pyyaml
#bigdata2's answer is correct but it might also happen that there's a conflict with python 3. So, check pip version (pip --version) and if it outputs python 3 then:
sudo python -m pip install pyyaml
So it gets installed for the same version as python.
I had this problem because I installed it with
sudo pip install pyyaml --upgrade
instead of
sudo -H pip install pyyaml --upgrade
Uninstalling and re-installing pyyaml fixed the problem for me.
This should work:
sudo pip install pyyaml
Try this
pip install ruamel.yaml

Resources