Installing Spacy is failing with Python 3.7 on Windows 10 - python-3.x

Installing Spacy on Windows 10 with pip is failing. Installing any other of a number of modules is working fine for me.
Here is a pastebin containing the error message:
pip install -U spacy
or
python -m pip install spacy
output:
https://pastebin.com/Y9np4veN
I have tried this both with and without virtualenv and it is failing in the same manner either way. I have also already tried installing and updating setuptools. I've ensured that I am using Python 3.7 and pip3. There is no other version of python or pip installed on my PC.

I downgraded to Python 3.6 and was able to successfully install spacy

Using x86-64 ("64-bit") version of Python 3.7 (3.7.4) instead of x86 ("32-bit") one on Windows fixed the issue for me.

Related

Do I have different python versions and which one I am working with?

I am confused about different python versions on my Computer and in Anaconda.
First: I use an iMac (OSX Catalina).I sometimes use the command line (Terminal on my iMac) directly and sometimes I use Anaconda Navigator (for example when I want to work with Jupyter Notebooks).
When I type python3 --version, I get the answer that I have python 3.8.0 installed. But recently, I installed the latest pip version with pip3 --user --upgrade pip. The answer I got was:
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
pip 20.0.2 from /Users/Andrea_5K/Library/Python/3.7/lib/python/site-packages/pip (python 3.7)
I wondered why in this message python 3.7 is referenced.
When I check my Library/Python folder in my user folder I see that I have a 3.7 folder and a 3.8 folder as well. Is there something wrong? Is pip 20.0.2 now installed on python 3.7 although I use python 3.8? And what does the WARNING message mean?

CPLEX and Anaconda Python integration error on MacOS

I installed Anaconda 1.9.7, the Python version is 3.7.3. Then used
conda install -c ibmdecisionoptimization cplex
and
pip install cplex
However, I face this error:
No module named 'docplex'.
There is nothing on the net for solving this error of integrating CPLEX and Anaconda Python for Mac and Anaconda.
The problem was that docplex wants to install docloud and that there was no python 3.7 distribution for docloud. This is now fixed. See https://github.com/IBMDecisionOptimization/docplex-examples/issues/18

can't install flashtext python library on windows anaconda

I am running Python on anaconda windows.
I need to use flashtext library and seems it's not possible if you run python on windows.
Is there any solution ?
Using Windows 10 and Anaconda 2018.12 - Python 3.7, I ran the following in Anaconda prompt:
(base) C:\Users\john.doe>pip install flashtext
And it returned
Successfully installed flashtext-2.7
Testing revealed it works properly, however there are some caveats when mixing pip and conda.. please heed them.
Anaconda support FlashText library.
conda install -c derickl flashtext

Error while installing psycopg2 in Windows

I tried to install psycopg2 as:
pip install psycopg2
It was giving error for pg_config. I checked some stackoverflow notes and installed PostgreSQL. Added the path of pg_config in $PATH.
Now it is giving the below error:
LINK : fatal error LNK1181: cannot open input file 'libpq.lib'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\link.exe' failed with exit status 1181
Any help on this?
Have you tried reinstall without pip?
sudo apt-get install python3-psycopg2
EDIT: Since you're on windows:
You can try this if you're using python 2.7:
pip uninstall psycopg2
pip install git+https://github.com/nwcell/psycopg2-windows.git#win64-py27#egg=psycopg2
If you're using python 3.4:
pip uninstall psycopg2
pip install git+https://github.com/nwcell/psycopg2-windows.git#win64-py34#egg=psycopg2
More info here.
If you prefer, you can download the installer (.exe) and install it.
You can find it here.
I found the issue.... I was using Python 3.7 version. Looks like the latest stable version of psycopg2 (2.7.4) is not yet supported on Python 3.7. It is supported till 3.6
I downgraded my python to 3.6.5 in Anaconda and also to 2.7.15 through PyCharm. I was able to install psycopg2 in both and use them.
Go to https://pypi.org/project/psycopg2
in release history and select the version you want to download.
There will be a table with files and the versions of python that can be compatible with the selected version.
Now download the wheel file that matches your system configuration(mac/linux/win-32/win-64)
I did this and was able to download the package.
For windows10(64-bit), download psycopg2-2.7.7-cp36-cp36m-win_amd64.whl (998.5 kB), in case you have selected 2.7.7
For Windows users, to install the psycopg2 without any errors first install Python 3.7.4 version and then install psycopg2 using command pip install psycopg2 as it worked complete fine with me. I think there is some issue in Python 3.8.0 version onwards because while installing psycopg it is showing an error in setup wheels.
In case you are here in 2020, this is a problem with version 3.8 of python. I had the issue recently. Try using virtualenv so that you can use lower versions of python in your workspace until psycopg2 is supported fully on Python version 3.8

Install working rosbag package for Jupyter Notebook (Python 3)

Trying to plot the data from ros topics in a rosbag file. My system by default had Python 2.7 and I installed Python 3.5 just to work with Jupyter notebooks.
Now I have installed several packages twice, once for Python 2 and again for Python 3. Although most packages are compatible with both versions of Python, I am beginning to wonder if all the ros packages are compatible here.
For the image in this question, initially I was getting an error 'No module named 'rosbag_pandas'', then I installed it with pip3. Now I am facing the error shown in the image with regards to rosbag. I have searched high and low for a quick fix but to no avail. I read online that some packages only work with either Python 2.7 or with Python 3.5. Is that what's happening here?
FYI I have installed pyrosbag with pip and pip3 both. Still facing this issue. Could really use some help with this.
I faced the same problem and found a workaround for me. Basically, on top of the usual python 3 installation, install a python 2 kernel for jupyter notebook, as described here, as follows:
python2 -m pip install pip
python2 -m pip install --upgrade ipykernel
python2 -m ipykernel install
Not sure if there is indeed a python 3 package for rosbag but using the python 2 kernel you can import rosbag files to save them in another format for further processing in python 3.

Resources