Install Shapely in Python 3 - python-3.x

I cant install the shapely module in my anaconda prompt.
pip install --upgrade setuptools
pip install shapely
Command "python setup.py egg_info" failed with error code 1 in C:\Users\renau\AppData\Local\Temp\pip-install-27xf59zz\shapely\
Any solutions?

If you are using Anaconda, then it would probably be best to use:
conda install shapely

i guess you are using Windows ?
if so, you can't install shapely directly via pip
here's the steps:
go to this site and download desired version of shapely
run this script
pip install Shapely‑1.6.4.post1‑cp36‑cp36m‑win_amd64.whl
here i'm going to install Shapely version 1.6.4 for python 3.6 running in Windows 64bit

sudo apt-get install python-shapely
on Python 3
sudo apt-get install python3-shapely

Related

Unable to install beautifulsoup4 in python on Mac Os

I am trying to install beautifulsoup4 in my mac using the following command:
pip3 install beautifulsoup4
But I am getting this following error:
Could not find a version that satisfies the requirement beautifulsoup4 (from versions: )
No matching distribution found for beautifulsoup4
How can I solve this?
Update pip with pip3 install --upgrade pip. Now you should be able to install beautifulsoup pip3 install beautifulsoup4. If that fails try: python3 -m pip install beautifulsoup4
If you’re using a recent version of Debian or Ubuntu Linux, you can install Beautiful Soup with the system package manager:
$ apt-get install python-bs4 (for Python 2)
$ apt-get install python3-bs4 (for Python 3)
Or
you can install it with easy_install or pip.
$ easy_install beautifulsoup4
$ pip install beautifulsoup4
If you are using Anaconda distribution, you can use this command.
conda install -c anaconda beautiful-soup
Hope this helps.
I tried upgrading pip3 with what Jatmir was suggesting, but it did not work for me. Finally, I found another way to upgrade it in this post https://github.com/pypa/pip/issues/5255#issuecomment-381702613
curl https://bootstrap.pypa.io/get-pip.py | python3
I had the same issue with my MacBook and I did below.(2018/September)
Update pip with
pip3 install --upgrade pip
Now you should be able to install beautifulsoup
pip3 install beautifulsoup4
If that fails try:
python3 -m pip install beautifulsoup4
You can download the tarball from here.
extract it, then run:
sudo python setup.py install
if pip fails to work

installing Mayavi with pip - no module named 'vtkOpenGLKitPython'

I am trying to install mayavi via pip on my ubuntu 16.04 via shell. I am using python 3.6 via anaconda and already installed vtk and all other requirements but i get the above error when i try pip3 install mayavi or pip2 install mayavi.
Mayavi is packaged for ubuntu packages.ubuntu.com/xenial/mayavi2.
I suggest that you install with the command
sudo apt-get install mayavi2
instead, this will take care of installing a version that matches the vtk install on your system.
Try to rename libvtkOpenGLKitPython*.so file.
In my case it was:
cd /opt/conda/envs/pytorch-py3.6/lib/python3.6/site-packages/vtk
cp libvtkOpenGLKitPython36D-8.1.so libvtkOpenGLKitPython.so
and, maybe one more error with libxt6 file. Fix it:
apt install libxt6

Issue installing shapely Python Package

I am running python 3.6 on windows and am attempting to install Shapely using
pip install shapely==1.6b2
It is giving me the following errors
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Cameron\AppData\Local\Temp\pip-build-242ae_ih\shapely\
I have seen the other posts about this issue and have tried:
pip install --upgrade setuptools
pip install ez_setup
easy_install -U setuptools
Nothing seems to work and I am not sure what to do next. Any advice would be appreciated.
Thanks
You may try to use the binary from this unofficial site. Just use pip install {wheel file name} to install it.
Shapely‑1.5.17‑cp36‑cp36m‑win32.whl (32-bit)
Shapely‑1.5.17‑cp36‑cp36m‑win_amd64.whl (64-bit)
Hope this would make the installation easier.
I had a similar error for installing shapely-1.5.17 via pip install shapely, and installing this made the pip install command work thereafter:
sudo apt-get install libgeos-dev
As of 2020, you can now simply install Shapely for Windows with:
pip install shapely
(you many need --upgrade to get at least version 1.7.0, when binary wheels were added for Windows)

PyEnchant installation issues

I'm trying to install PyEnchant, but when I write:
pip install pyenchant
in terminal I get:
-bash: pip: command not found
I have looked into installing PyEnchant with a wheel as well but I get the same error.
How do I install PyEnchant?
Python 3 required the pip3 command instead of just pip.
Use:
pip3 install pyenchant

Use or install different versions of python3 pip

I'm trying to install packages for my python 3.5.0 versus my python 3.4.3
I can run both by typing either python3.4 or python3.5
I have pip2 and pip3. I also ran the script sudo easy_install3 pip, which made me be able to use pip3.4 But I am still having trouble installing modules for python3.5. pip3 just installs for python3.4
I am looking to install termcolor for python3.5 and I am having no success. Can anyone help?
I am on Windows, and you appear not to be, but maybe the following will help.
If pip is in your system's equivalent of python35/Lib/site-packages, then python3.5 -m pip should run pip so that it installs into the 3.5 site-packages.
If you do not have pip in the 3.5 site-packages, copy its directory, along with its dependencies (pip....dist-info/, setuptools/, setuptools....dist-info/, and easyinstall.py) from the 3.4 site_packages.
Or, if pip3 or even pip3.4 is in python35/Scripts, run it with its full path name so you are not running the 3.4 version.

Resources