Am encountering an issue running PaddleOCR on M1 Macbook
ERROR: flag 'flagfile' was defined more than once (in files '/Users/paddle/xly/workspace/f2bafd01-b80e-4ac8-972c-1652775b2e51/Paddle/build/third_party/gflags/src/extern_gflags/src/gflags.cc' and '/tmp/gflags-20211021-3963-1mi18ai/gflags-2.2.2/src/gflags.cc').
This is related to the new version 2.6. With 2.5 you can use the wheel with the M1 (maybe you will need to debug some of the dependencies).
The good news is I've just installed PaddleOCR 2.6.1.2 on my Mac, right now.
You have two options:
You can upgrade to Python 3.10 (I am using 3.10.8) and then this error is gone
You can stick to Python 3.9 or lower and install PaddleOCR manually
If you want to continue with Python 3.9 or lower, then instead of installing via pip or conda, you do it manually by building the egg locally (it is an egg and not a wheel because it is using setuptools).
Assuming you already have a conda env or similar (mine has Python 3.10 and paddlepaddle 4.2.1, you'll probably need to install setuptools), you proceed as follows:
git clone https://github.com/PaddlePaddle/PaddleOCR.git
cd PaddleOCR
conda install --file requirements.txt
python setup.py install
After this you can use PaddleOCR on that environment.
Dependencies that can bring on some issues are Shapely, PyMuPDF, protobuf... Anyway I believe this whole issue will be fixed in the next release and then we will be able to use the wheel as-is.
MAC M1 chip can't follow Paddle's document step by step. I solve it by downloading the source code and recompiling it
https://juejin.cn/post/7189617837424672805
I'm trying to install tensorflow-gpu==1.7.0 in the docker image frolvlad/alpine-python2, using the command pip install tensorflow-gpu==1.7.0 but it seems like pip can't find it, I have tried with pip install tensorflow to install the latest but still no result.
i should mention that it works fine for pandas and numpy.
I just wanna know if it has something to do the deprecation message, and is there anyway to solve this.
Have a look for tensorflow-gpu==1.7.0 in pypi which you are looking for here, you could see the package meets the python2.7 requirement is tensorflow_gpu-1.7.0-cp27-cp27mu-manylinux1_x86_64.whl.
Unfortunately, the name cp27 means CPython, here I guess it's restricted to glibc, while alpine is using musl libc, if you download this wheel to your alpine container and have a install it will reports next error:
ERROR: tensorflow_gpu-1.7.0-cp27-cp27mu-manylinux1_x86_64.whl is not a supported wheel on this platform.
So, if you are not limited to use alpine, you could use debian based container, e.g. python:2, then you could successfully find the package just like you did in your local host machine.
# pip install tensorflow-gpu==1.7.0
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting tensorflow-gpu==1.7.0
Downloading tensorflow_gpu-1.7.0-cp27-cp27mu-manylinux1_x86_64.whl (256.2 MB)
If stick on alpine, I guess you may need to build from source code by yourselves, and may results in a lots effort to conquer issues, may refers to this to have a luck.
I’ve been trying to pip install pyHook for about 3 hours and tried every method that I can possibly think of or find but I can’t seem to get it to work. I get the error:
Requirement ‘pyHook-1.5.1-cp37-cp37m-win32.whl’ looks like a filename,but file does not exist. Than it says pyHook-1.5.1-cp37-cp37m-win32.whl is not a supported wheel on this platform.
Please help.
Head over to this link
Then find pyhook and install pyHook-1.5.1-cp37-cp37m-win32.whl.
Go to cmd and type pip install followed by the path of your pyhook file. For example:
C:\\user\download\pyHook-1.5.1-cp37-cp37m-win32.whl
Since you seem to have python3:
pip3 install pyHook
This should work.
You're also probably on a 64 bit Computer, so in the original wheel method, install the one with the _amd64 suffix.
If one is using Windows, for installing pyHook, download the file related with your system version (32/64) from here.
Note that for whl files one may need to install the wheel package, as
pip install wheel
And then
pip install file_name.whl
I am trying to install PyAudio on Python 3.7.
Problem is when I try a simple import pyaudio it prints :
Please build and install the PortAudio Python bindings first.
According to this post, the problem could be solved by downloading he binaries and installing the wheels.
However pip install PyAudio-0.2.11-cp37-cp37m-win_amd64.whl only shows :
Cannot uninstall 'PyAudio'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Is there any other way to delete completely PyAudio to try the first solution, or do I have to manually build PortAudio ?
I am running Windows 10 64bit.
Here is how I managed to solve my problem :
I delete PyAudio and Portaudio files in the libraries folder manually.
Then, as described here, I went on this downloaded the .whl and installed it with the Windows command : pip install PyAudio-0.2.11-cp37-cp37m-win_amd64.whl
It seems to work fine since I have no more error output.
I found out that it's impossible to install NumPy/SciPy via installers on Windows 64-bit, that's only possible on 32-bit. Because I need more memory than a 32-bit installation gives me, I need the 64-bit version of everything.
I tried to install everything via Pip and most things worked. But when I came to SciPy, it complained about missing a Fortran compiler. So I installed Fortran via MinGW/MSYS. But you can't install SciPy right away after that, you need to reinstall NumPy. So I tried that, but now it doesn't work anymore via Pip nor via easy_install. Both give these errors:
There are a lot of errors about LNK2019 and LNK1120,.
I get a lot of errors in the range of C: C2065,C2054,C2085,C2143`, etc. They belong together I believe.
There is no Fortran linker found, but I have no idea how to install that, can't find anything on it.
And many more errors which are already out of the visible part of my cmd-windows...
The fatal error is about LNK1120:
build\lib.win-amd64-2.7\numpy\linalg\lapack_lite.pyd : fatal error LNK1120: 7 unresolved externals
error: Setup script exited with error: Command "C:\Users\me\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\BLAS /LIBPATH:C:\Python27\libs /LIBPATH:C:\Python27\PCbuild\amd64 /LIBPATH:build\temp.win-amd64-2.7 lapack.lib blas.lib /EXPORT:initlapack_lite build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_litemodule.obj /OUT:build\lib.win-amd64-2.7\numpy\linalg\lapack_lite.pyd /IMPLIB:build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_lite.lib /MANIFESTFILE:build\temp.win-amd64-2.7\Release\numpy\linalg\lapack_lite.pyd.manifest" failed with exit status 1120
What is the correct way to install the 64-bit versions NumPy and SciPy on a 64-bit Windows machine? Did I miss anything? Do I need to specify something somewhere? There is no information for Windows on these problems that I can find, only for Linux or Mac OS X, but they don't help me as I can't use their commands.
You can install scipy and numpy using their wheels.
First install wheel package if it's already not there...
pip install wheel
Just select the package you want from http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy
Example: if you're running python3.5 32 bit on Windows choose scipy-0.18.1-cp35-cp35m-win_amd64.whl then it will automatically download.
Then go to the command line and change the directory to the downloads folder and install the above wheel using pip.
Example:
cd C:\Users\[user]\Downloads
pip install scipy-0.18.1-cp35-cp35m-win_amd64.whl
EDIT: The Numpy project now provides pre-compiled packages in the wheel format (package format enabling compiled code as binary in packages), so the installation is now as easy as with other packages.
Numpy (as also some other packages like Scipy, Pandas etc.) includes lot's of C-, Cython, and Fortran code that needs to be compiled properly, before you can use it. This is, btw, also the reason why these Python-packages provide such fast Linear Algebra.
To get precompiled packages for Windows, have a look at Gohlke's Unofficial Windows Binaries or use a distribution like Winpython (just works) or Anaconda (more complex) which provide an entire preconfigured environment with lots of packages from the scientific python stack.
Installing with pip
You can install the numpy and scipy wheels on Windows with pip in one step if you use the appropriate link from Gohlke's Unofficial Windows Binaries (mentioned by sebix) and run the Windows command prompt as Administrator. For example, in Python 3.5, you would simply use something like this:
# numpy-1.9.3+mkl for Python 3.5 on Win AMD64
pip3.5 install http://www.lfd.uci.edu/~gohlke/pythonlibs/xmshzit7/numpy-1.9.3+mkl-cp35-none-win_amd64.whl
# scipy-0.16.1 for Python 3.5 on Win AMD64
pip3.5 install http://www.lfd.uci.edu/~gohlke/pythonlibs/xmshzit7/scipy-0.16.1-cp35-none-win_amd64.whl
Best solution for this is to download and install VCforPython2.7 from https://www.microsoft.com/en-us/download/details.aspx?id=44266
Then try pip install numpy
Downloading the binaries for 64-bit from http://www.lfd.uci.edu/~gohlke/pythonlibs/, and installing it directly with pip in this order:
pip install numpy-1.12.0+mkl-cp36-cp36m-win64.whl
pip install scipy-0.18.1-cp36-cp36m-win64.whl
pip install matplotlib-2.0.0-cp36-cp36m-win64.whl
Note that you must place command prompt in the folder where you put the .whl files after downloading them, and you must run it as administrator,
worked for me on Windows 10 64-bit now python is up and running.
You can now pip install numpy on Windows!
"Note: this page has only historical relevance, you can now pip-install for windows"
Source: https://github.com/numpy/numpy/wiki/Whats-with-Windows-builds
Intel provides pre-compiled Python modules for free in their "Intel Distribution for Python". The modules are compiled against Intel's MKL (Math Kernel Library) and thus optimized for faster performance. The package includes NumPy, SciPy, scikit-learn, pandas, matplotlib, Numba, tbb, pyDAAL, Jupyter, and others. Find more information and the download link here
If you are on windows , you wouldn't need wheel anyway! You can directly install package by downloading the 32-bit package as win32 from this link [http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy] and then move that downloaded package to cmd's current directory and open cmd and write following codepip install numpy-1.13.1+mkl-cp36-cp36m-win32.whl then do it same for scipy
For 64-bit you need to install mingw-w64 as it is gcc and compiles numpy and scipy as precompiled status.
Currently it works fine with 32-bit.So I had opted for win32 package both for numpy+mkl and scipy in that link.
Hope This works! Give a try
You can download the needed packages from here and use pip install "Abc.whl" from the directory where you have downloaded the file.
Look into python wheels to solve your problem. The best part of python wheels is that they let you install C extensions with no compilers. I just installed numpy and scipy using pip in a clean python install and they both worked fine.
for python 3.6, the following worked for me
launch cmd.exe as administrator
pip install numpy-1.13.0+mkl-cp36-cp36m-win32
pip install scipy-0.19.1-cp36-cp36m-win32
Package version are very important.
I found some stable combination that works on my Windows10 64 bit machine:
pip install numpy-1.12.0+mkl-cp36-cp36m-win64.whl
pip install scipy-0.18.1-cp36-cp36m-win64.whl
pip install matplotlib-2.0.0-cp36-cp36m-win64.whl
Source.
Hey I had the same issue.
You can find all the packages in the link below:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-learn
And choose the package you need for your version of windows and python.
You have to download the file with whl extension. After that, you will copy the file into your python directory then run the following command:
py -3.6 -m pip install matplotlib-2.1.0-cp36-cp36m-win_amd64.whl
Here is an example when I wanted to install matplolib for my python 3.6 https://www.youtube.com/watch?v=MzV4N4XUvYc
and this is the video I followed.
Follow these steps:
Open CMD as administrator
Enter this command : cd..
cd..
cd Program Files\Python38\Scripts
Download the package you want and put it in Python38\Scripts folder.
pip install packagename.whl
Done
You can write your python version instead of "38"