Error installing library of Scrapy in PyCharm - scrapy

I can install other packages, but can't install Scrapy. I get the following errors:
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'lxml.etree' extension
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
However, C++ is installed, which I installed numerous of times. I have x86 and 64 bit installations (not sure if it's 10.0) but I have 2013-2017 versions installed.

Please upgrade your pip by following command.
python -m pip install --upgrade pip
Then install Scrapy by following command.
pip install Scrapy

download latest twisted package and install with pip.
https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
after that install scrapy

In my case, I found that pywin32 was not installed...
So I did

download the latest Twisted package from https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
You want to use the amd64 if you have Windows 64 (regardless if it's an Intel processor or not)
You can use any browser for the download and copy/paste the file into the project folder of your current pycharm project.
Then in pycharm type this:
pip install Twisted-20.3.0-cp39-cp39-win_amd64.whl
(assuming that your package was Twisted-20.3.0-cp39-cp39-win_amd64.whl)
then proceed with:
pip install Scrapy

Related

Importing cx_Oracle in Jupyter note book gives ModuleNotFoundError

i am using jupyter notebook and i am trying to do sql queries in jupyter book
but i got an error
To install cx_Oracle latest version 8.0.0 in your own laptop, you need the following components already installed:
Python 3x
An Oracle Instant Client version 11g or higher. Refer to download the instant client version to this link
https://www.oracle.com/database/technologies/instant-client/downloads.html
Steps to Download and Install cx_Oracle Package for Python on Windows. In my case, I like better the version available in GitHub
https://github.com/oracle/python-cx_Oracle
1.Click on the Download cx_Oracle link to download the package from Github. It will download a zip file into your laptop.
2.Extract the zip file to a folder on Windows. For example, C:\cx_oracle.
3.Now open the command prompt and change the current directory to the C:\cx_oracle directory to install cx_Oracle package.
4.Then run the following command.
python -m pip install cx_Oracle --upgrade pip
It will install the cx_Oracle package for Python on Windows, and you will get the messages as shown below.
Collecting pip
Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (1.3MB)
100% |¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦| 1.3MB 2.5MB/s
Installing collected packages: pip
Found existing installation: pip 10.0.1
Uninstalling pip-10.0.1:
Successfully uninstalled pip-10.0.1
Successfully installed pip-18.0
Important if you have more than one version of Python, use the one associated to Jupyter notebook.
You need to import the package first:
pip install cx-Oracle
In simple words for anaconda users
while installing the package use small case letters source
conda install -c conda-forge cx_oracle
now while importing the package use init cap as
import cx_Oracle

Install TensorFlow addons

I have a venv with the following details:
python 3.6
TensorFlow 2.0.0
I tried to install tensorflow-addons using the following:
pip install -q --no-deps tensorflow-addons~=0.6
But then I keep receiving the following error:
Could not find a version that satisfies the requirement tensorflow-addons~=0.6 (from versions: )
No matching distribution found for tensorflow-addons~=0.6
You are using pip version 18.0, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
I also tried other versions of tensorflow-addons, e. g., 0.4.0, 0.5.0, ..., but it did not work out.
I came across this problem two times and each time I had to solve the problem with a different solution.
1. Solution:
Upgrade pip/pip3 by using the following command.
python3 -m pip install --upgrade pip
Select appropriate version of the tensorflow-addons using the
following link
https://github.com/tensorflow/addons#python-op-compatibility-matrix
Install using the following command
pip install tensorflow-addons==version
2. Solution:
go to https://pypi.org/project/tensorflow-addons/#history
click on appropriate version
click on "Download files" on menu to the left
click on a .whl file that matches your system
requirements/specifications
go to the directory where you download the .whl file and run the
following
pip install tensorflow_addons-name.whl
The problem appears to have been related to installing on Windows platforms in the earlier versions of tensorflow-addons. As of time of updating this comment this issue should disappear completely.
In fact the developers state it has been solved, as it is shown here:
FYI stable release for windows is out. pip install tensorflow-addons
https://github.com/tensorflow/addons/issues/173#issuecomment-573106184
At your command prompt, simply specify the version you want to install.
For me, my python version is 3.7.4 and Tensorflow version is 2.2.0
Therefore, the tensorflow-addons version that matches my python and tensorflow version is 0.10.0
pip install tensorflow-addons==0.10.0

Pycharm. Trouble installing numpy-mlk for Windows

I'm new to Python and am trying to install numpy-mkl from Pycharm. I get the following error even though I upgraded 'pip' to version 8.1.1 from Pycharm.
Thanks!
http://i.stack.imgur.com/ipvJw.png
i don't believe numpy-mkl is in the repositories, so it can't be installed the way you're doing it.
if you're running windows, download the appropriate Numpy+MKL .whl file from Here. For me, on cpython 3.5 64-bit, the current file is numpy-1.11.1+mkl-cp35-cp35m-win_amd64.whl
then run:
pip install "numpy-1.11.1+mkl-cp35-cp35m-win_amd64.whl"
i'm not sure if the .whl file needs to be in the same folder as your python installation or pip.

How to install lxml on Windows 8 64-bit with Python 3.4

Related Question 1
Related Question 2
[Error Log]
C:\Users\Hima\Documents\Installers\python\packages>python -m pip install lxml-3.4.4-cp34-none-win_amd64.whl
lxml-3.4.4-cp34-none-win_amd64.whl is not a supported wheel on this platform.
[Environment]
Windows x86 (64-bit)
Installed Visual Studio C++ 2014
Python 3.4
I use pip (or pip3.4.exe; built-in to Python 3.4) to pip install lxml
[Issues]
1. The lxml file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml shows as not supported.
2. In the following Package Index for lxml, there isn't a suitable lxml file for 64 bit and Python 3.4.
https://pypi.python.org/pypi/lxml/3.4.4
I have been struggling with this today. I found, elsewhere on stackoverflow.com, this two-part and quick solution, which resulted in python no longer complaining when I tried to use lxml:
Go to this repository and download a version which matches your Python installation (the version number, and 32- vs 64-bit. I use Python 3.5.1 64-bit, installed on Windows 10, so on that page, I chose lxml-3.6.0-cp35-cp35m-win_amd64.whl.
You say you use Python 3.4, so use a version that matches that (or maybe the one you already have).
There is some helpful information at the top of the page about which version of CPython the files are built against.
The output of python -v will also tell you which version of MSVC++ was used to build your version of the python executable.
This answer is useful for determining MSVC versions from the output of python -v (which contains a build number instead of a version number).
My download directory is d:\Downloads. Python must be in your PATH environment variable for the next step to work. Use a command like the following, changing "D:\Downloads" to the pathname to your download directory. Then, at a DOS prompt, type:
python -m pip install "D:\Downloads\lxml-3.6.0-cp35-cp35m-win_amd64.whl" lxml-3.6.0-cp35-cp35m-win_amd64.whl
My config:
Python 3.5
Windows 10
Downloaded lxml-3.6.0-cp35-cp35m-win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
Copy this file to: c:\Program Files\Python35\
first in cmd line:
c:\Program Files\Python35>py -m pip install --upgrade pip
Then in cmd line:
c:\Program Files\Python35>py -m pip install lxml-3.6.0-cp35-cp35m-win_amd64.whl
And it's done

Pillow installed but not identified (Mac OS Yosemite)

I Installed pillow using brew, and when I try to repeat the isntallation I see it's there:
brew install Homebrew/python/pillow
Warning: pillow-2.7.0 already installed
But when I try to load it into a script I get an error:
ImportError: No module named Image
Any suggestions?
python usually looks for Pillow under normal site package installs. Here's what I would do to get a minimal Pillow setup where python should be guaranteed to see it:
sudo easy_install pip
pip install Pillow
I think it may also be possible to just do:
sudo easy_install Pillow
but pip is a bit more user friendly if you're planning on using more python scripts that might have dependencies.
Note: another issue you might be running into is if you're trying to use the Homebrew python but are ending up using the base OSX install of it instead. Make sure which python is showing you what you expect it to be.