I used following process to install:
Download & install 64-bit Python: https://www.python.org/downloads/release/python-342/
Download the 64-bit version of numpy:
pip install "numpy-1.9.2rc1-cp34-none-win_amd64.whl"
pip install pandas==0.14.0
Error message is attached.
Thank you for help.
enter image description here
When you intstall pandas it will automatically install numpy so need to install numpy seperately, also you need to have microsfit visual basic C++ 10.0.
I had the same case and when I installed it everythig went fine.
Related
I am currently on Linux x86-64 machine. I am trying to install opencv in my virtual environment using pip however the error I keep receiving is
ERROR: Could not find a version that satisfies the requirement numpy==1.19.3 (from versions: 1.19.2+computecanada, 1.21.0+computecanada, 1.21.2+computecanada)
ERROR: No matching distribution found for numpy==1.19.3
I am running python 3.9.6 (64bit) and my current numpy version is 1.21.3. the command I've been using is pip install opencv-python. i've also tried uninstalling other instances of openCV and have tried the other options all with the same error. Does openCV not support numpy 1.21.3? Would anyone be able to point me in the right direction?
On computecanada you don't need to install OpenCV.
You can use it by following these commands:
module spider opencv
module load opencv/version
Actually, this error happens if numpy version does not match OpenCV required version.
for my case:
I used python 3.6. so I solved this error by following:
pip install numpy==1.19.0
pip install opencv-python==3.4.11.45
after installing numpy I search which OpenCV version support this numpy version, I found 3.4.11.45 so I install it by 2 number command and it is working.
I am building a Python web scraping script and i have to use cv2 (OpenCV). So I install using pip install opencv-python as the website directs. And it also installs numpy as a dependency.
However, right after installing that, I'm unable to run my python script. It crashes with the error below:
I think the issue is from Numpy but I don't know how to fix this. Please help.
This is my environment:
MacOS 10.15.7
Python 3.9.0
pip 20.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
Numpy 1.19.2
opencv-python 4.4.0.44
I had the same issue when I tried to run a project I made on Windows on Mac OS. The solution I found was to install an older version of numpy (e.g. numpy 1.18).
Here is the command I ran to do so :
sudo python -m pip install numpy==1.18 --force
I don't think it is a good solution but it is ok for a temporary fix.
Not able to install gensim on windows.Please help me I need to gensim Immediately and tell me installation steps with More details and other software that needs to be installed before it. thanks
First you need to install NumPy then SciPy and then Gensim (assuming you already have Python installed). I used Python 3.4 as I find it easier to install SciPy using version 3.4.
Step 1) Install Numpy:
Download numpy‑1.13.1+mkl‑cp34‑cp34m‑win32.whl from here
note that in cp34-cp34m 34 is version of Python you are using. So download appropriate file
Open command prompt and go the folder in which you just downloaded the file and install Numpy using following command:
pip install numpy‑1.13.1+mkl‑cp34‑cp34m‑win32.whl
You should get successfully installed numpy message
Step 2) Install SciPy:
Follow the same link as above and download the scipy‑0.19.1‑cp34‑cp34m‑win32.whl file.
Install it using the same instructions than in Step 1 but with this file name. The command is the following:
pip install scipy‑0.19.1‑cp34‑cp34m‑win32.whl
You should get this message successfully installed scipy
Step 3) Install gensim:
Follow the link in step 1 and download gensim‑2.3.0‑cp34‑cp34m‑win32.whl (the appropriate version for your system)
Install it using the instructions in Step 1 (with this file name) with following command:
pip install gensim‑2.3.0‑cp34‑cp34m‑win32.whl
You should get this message successfully installed gensim
Now in a Python shell try:
import gensim
It should be successfully imported
NOTES:
Make sure pip is in your environment variables (add C:\python34\scripts to your environment variable).
Make sure to download all the packages according to the Python version you are using.
gensim depends on scipy and numpy.You must have them installed prior to installing gensim. Simple way to install gensim in windows is, open cmd and type
pip install -U gensim
Or download gensim for windows from
https://pypi.python.org/pypi/gensim
then run
python setup.py test
python setup.py install
I struggled with this a bit today trying to figure out if I needed a python 2.7 environment or if I could use my 3.5. I ended up doing this from an Anaconda 3.5 install:
conda install -c anaconda gensim=0.12.4
After a few hours of trying various things, suddenly it all worked on 3.5. My error was that it kept failing to install Scipy. I tried starting over with the conda install and just worked.
See: https://anaconda.org/anaconda/gensim
I strongly suggest using anaconda where the installation of all the packages is very easy.
The command for installing genism and all of its necessary packages on windows using anaconda python 3.7 is below.
conda install -c anaconda gensim
I followed the instruction on https://radimrehurek.com/gensim/install.html which then successfully installed the fast version of Gensim (3.8.0) on Windows:
conda install -c conda-forge gensim
PS:
The following did NOT install the fast version on Windows:
conda install gensim
After attempting some of the above ideas, there was still a "hiccup" with gensim but the error was something else related to punkt. The following (where the interest is the second line)...
import nltk
nltk.download('punkt')
import numpy
import scipy
import gensim
...did the trick. I used conda and not pip but do not believe that mattered.
Versions: latest python
Machine: Windows 10 (latest updates as of 8/2020)
I am having a strange issue installing numpy or nltk python-modules in my windows-7 machine. I have successfully installed Python 2.7.12 but I get this error when I type pip install numpy as in this screenshot. I have also included the directory of pip.exe in the PATH. Any help would be appreciated.Thank you :)
Installing such these things in windows are sometime difficult, specially for someone new to python packages(also for some experts!)
Try to use Anaconda for windows: https://www.continuum.io/downloads#_windows
This install a python for you and many requirement packages(e.g Numpy, Scipy, Scikit and many more)
You can use older version of Anaconda, for python2.x if you want strictly python2.x
An alternative way is to download Numpy from github and then install it as a python package, that contain setup.py file
python setup.py install
Or you can download Numpy wheel package, then install it localy with pip
I have Windows 7.
For some reason, f2tfont.cpp does not compile when installing matplotlib (through pip), hence, the matplotlib install fails. Also, the matplotlib installer cannot find a Python installation.
See comments here for further details on the problem.
These following commands worked for me. I think problem is with the new matplotlib version 3.3.1. I downgraded to matplotlib 3.0.3.
I uninstalled the newer version, then reopen command prompt and installed matplotlib 3.0.3. It's worked for me. I am not sure if it will work for you, so I recommend to check out the discussion.
pip uninstall matplotlib
pip install matplotlib==3.0.3
This solves my problem
As a workaround until matplotlib 3.1.1 is released, you could install this package msvc-runtime using the following command:
pip install msvc-runtime
This worked for me on Windows 10 (using the Anaconda prompt):
pip uninstall matplotlib
pip install --upgrade matplotlib
You need to have Visual Studio c++ in Your System.
Install Visual Studio 2019 with c++ distributions .
It worked perfectly for me.
This worked for me on Windows 10:
pip install matplotlib==3.2.1
As specified in PEP 11, a Python release only supports a Windows platform while Microsoft considers the platform under extended support. This means that Python 3.7 supports Windows Vista and newer. If you require Windows XP support then please install Python 3.4.
For Python 3.6+ you need to have Windows Service Pack 1 installed.
In case Windows Service Pack isn't installed. You can download Windows 7 Service Pack 1 (SP1) manually from here or also you can download it from Windows Update of Windows 7.
Python needs the Microsoft C runtime for Visual Studio 2015, especially the file ucrtbase.dll.
So, you need to install Microsoft Visual C++ redistribution 2015 from here.
You don't need to install Microsoft Visual Studio just C++ redistributions of 2015 will do the job.
I had this issue and then uninstalled and reinstalled conda, and updated all packages through conda. But the issue persisted. I then did a conda uninstall of the offending package (in my case, this error appeared for both matplotlib and h5py), and then pip installed them. This seemed to have fixed the issue. Strangely, it would only give this error through the console. When run through a Jupyter notebook, I didn't see this error. Must be some difference between IPython and python.
If you get this error by just importing matplotlib, you probably have a botched matplotlib installation. Did you compile it yourself (which I find very hard to do) or did you use a binary installer from the official page (which works like a charm, as long as you installed the dependencies beforehand)?
DO NOT USE pip for installing matplotlib and numpy, but use it for all other dependencies. This may change in the future as soon as wheels arecoming out for matplotlib.
Python console output on a Windows box:
>>> matplotlib.__version__
'1.3.1'
>>> from matplotlib import ft2font
>>>
None of above solutions worked for me! Try this:
pip uninstall matplotlib
pip install -U matplotlib==3.2.0rc1
I am running windows 7 with Python version 3.7.1 and Pip version 19.1.1
I needed to install Microsoft visual studio.
Microsoft visual studio is needed for the kiwisolver that is installed with matplotlib using pip. It is free but a 4MB download took over one to two hours to get on my machine and installed.
After using pip to install matplotlib, but without visual studio on my machine, running my script with
import matplotlib.pyplot as plt
the error I had was:
import matplotlib ImportError: DLL load failed: The specified procedure could not be found
After installing visual studio everything worked great!
Get Microsoft visual studio here.
If you are getting error each time u try installing matplotlib on ur pc through jupyter, just down download the ccleaner and then click on the health check icon after installation, followed by the custom clean to check for duplicated files causing the issue, then go back to install the matplotlib through anaconda command prompt by typing pip install matplotlib
to me i solved the problem by uninstalling python 3.8 and installed python 3.5
just install "Microsoft Visual C++ redistributable"