PaddleOCR Error flag 'flagfile' was defined more than once - python

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

Related

chocolatey says it has successfully force reinstalled python 3.11 - but I can't find it

Windows 11.
I am not great at virtual environments, and I have bumped around between a half dozen different "solutions." I thought I had it solved with chocolatey, but I am trying to install python3.11, and not having success. Basically, choco says it is installed, but I can't find it anywhere.
C:\Windows\System32>choco install --force python --version=3.11
Chocolatey v1.2.0
Installing the following packages:
python
By installing, you accept licenses for the packages.
python v3.11.0 already installed. Forcing reinstall of version '3.11.0'.
Please use upgrade if you meant to upgrade to a new version.
Progress: Downloading python 3.11.0... 100%
python v3.11.0 (forced) [Approved]
python package files install completed. Performing other installation steps.
The install of python was successful.
Software installed to 'C:\ProgramData\chocolatey\lib\python'
Chocolatey installed 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
C:\Windows\System32>
This gives the impression that python would be in C:\ProgramData\chocolatey\lib\python, but the only files in that directory are python.nupkgandpython.nuspec`
Where do I go to find my shiny new python?
From PowerShell, run get-command python.exe
And you will get something like this:
CommandType Name Version Source
----------- ---- ------- ------
Application python.exe 0.0.0.0 C:\Users\Paul\AppData\Local\Microsoft\WindowsApps\python.exe
The Source column is where it is running python.exe from and where python is installed.
The python package on the Chocolatey Community Repository is a metapackage. So it does not install python, instead, it has a dependency on python2 or python3 (depending on the version of python), that dependent package is what actually installs Python. So if you install python v3.11, that will have a dependency on python3 v3.11, and the python3 package will download and run the Python installer.
Instead of force installing python, try for installing python3 to rerun the Python installer.
As for the install location, packages install to $env:ChocolateyInstall\lib\. So the .nupkg, .nuspec, chocolateyInstall.ps1, etc will all be there. But the python3 package runs the Python installer, and the Python 3.11.x installer will by default install to C:\python311 when run by the chocolateyInstall.ps1 in the python3 package.

How to pip install GDAL on Python 3.6 venv

gdal is correctly installed on my global system's python 3.5 packages.
But now I'm trying to pip install gdal on my python 3.6 virtual environment, but I receive multiple errors.
After activating the virtual environment, I've tried the following:
pip install pygdal or pip3 install pygdal
Error received: ERROR: Failed building wheel for pygdal
Tried following this guide, but the commands stated there are outdated
I've also tried this solution and this which failed
Installed older gdal versions but also didn't work.
Tried pip3 install GDAL==$(gdal-config --version) and I get the same error
I use
Ubuntu 16.04 and pip 21.0.1. Venv was created using virtualenv --python=/usr/bin/python3.6 my_venv
I've finally fixed the problem, and these are the steps I followed:
I uninstalled wheel from my venv
Then I pip installed gdal on the venv to check what error would appear
A wall of error text appeared, in which somewhere I noticed the 'x86_64-linux-gnu-gcc' failed with exit status 1
I typed sudo apt-get install python3.6-dev to install missing packages, as the solution suggests here
Then I ran pip install GDAL=<version that appears on ogrinfo --version> and it worked
EDIT: This answer pertains more to Windows than Ubuntu, but may have something useful.
Try downloading a wheel from here:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal
Note the "cp##" in the middle - that should match your Python version. If you are running Python 3.6 then you should see "cp36" in the file name (a "cp37" in the name means the wheel will fail). Also pay attention to the amd64 and win32 to be sure you have the correct version to match your Python virtual environment.
I'm on Windows instead of Ubuntu, but this was my process:
Open command prompt with cmd
Copy the path to activate.bat in the virtual environment from Windows Explorer (hold shift down, right-click on file, choose
"copy as path")
Paste path into control panel and hit enter. You should see an indicator that you are in virtual environment.
Copy the path to the wheel you downloaded to the clipboard using the same shift key trick.
Type 'pip install ' then paste the wheel path from your clipboard (or type it all out manually)
As an aside, I ended up with gdal installed within the osgeo module. I tried several things before I got here, but I'm pretty sure that happened with my installation from the wheel. In Python, I now use
from osgeo import gdal
I hope something here helps you. I've run into this a few times and it never seems like I quite remember how I got it done the next time I run into it. If I remembered it right this time, I can refer back here.
FWIW - I am using PyCharm and installing gdal through the Project Interpreter doesn't work. Also, it may take some jostling in PyCharm for the skeletons to update after you install through command prompt.

dlib installation on Windows 10

I want to use dlib with python for image recognition. I have the python app running great with OpenCV on Windows 10, but when I want to install dlib from the cmd it gives me this following error :
error: Cannot find cmake, ensure it is installed and in the path. You
can install cmake using the instructions at https://cmake.org/install/
You can also specify its path with --cmake parameter.
What should I do?
Install Dlib from .whl
Dlib 19.7.0
pip install https://pypi.python.org/packages/da/06/bd3e241c4eb0a662914b3b4875fc52dd176a9db0d4a2c915ac2ad8800e9e/dlib-19.7.0-cp36-cp36m-win_amd64.whl#md5=b7330a5b2d46420343fbed5df69e6a3f
You can test it, downloading an example from the site, for example SVM_Binary_Classifier.py and running it on your machine.
Note: if this message occurs you have to build dlib from source:
dlib-19.7.0-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform
Install Dlib from source (If the solution above doesn't work)##
Windows Dlib > 19.7.0
Download the CMake installer and install it: https://cmake.org/download/
Add CMake executable path to the Enviroment Variables:
set PATH="%PATH%;C:\Program Files\CMake\bin"
note: The path of the executable could be different from C:\Program Files\CMake\bin, just set the PATH accordingly.
note: The path will be set temporarily, to make the change permanent you have to set it in the “Advanced system settings” → “Environment Variables” tab.
Restart The Cmd or PowerShell window for changes to take effect.
Download the Dlib source(.tar.gz) from the Python Package Index : https://pypi.org/project/dlib/#files extract it and enter into the folder.
Check the Python version: python -V. This is my output: Python 3.7.2 so I'm installing it for Python3.x and not for Python2.x
note: You can install it for both Python 2 and Python 3, if you have set different variables for different binaries i.e: python2 -V, python3 -V
NOTE: Make sure to open the PowerShell as admin, and you're inside the dlib directory before proceeding to step 6
Run the installation: python setup.py install
Linux Dlib 19.17.0
sudo apt-get install cmake
wget https://files.pythonhosted.org/packages/05/57/e8a8caa3c89a27f80bc78da39c423e2553f482a3705adc619176a3a24b36/dlib-19.17.0.tar.gz
tar -xvzf dlib-19.17.0.tar.gz
cd dlib-19.17.0/
sudo python3 setup.py install
note: To install Dlib for Python 2.x use python instead of python3 you can check your python version via python -V
Follow these steps:
pip install cmake
Install Visual Studio build tools from here.
In Visual Studio 2017 go to the Individual Components tab, Visual C++ Tools for
Cmake, and check the checkbox under the "Compilers, build tools and runtimes" section.
pip install dlib
Effective till now(2020).
pip install cmake
conda install -c conda-forge dlib
If you are using Anaconda Prompt (recommended),
conda install -c conda-forge dlib
Or you can use the approach mentioned below:
After spending a lot of time, this comment gave me the right result.
https://github.com/ageitgey/face_recognition/issues/802#issuecomment-544232494
Download Python 3.6.8 and install, make sure you add it to PATH.
Install NumPy, scipy, matplotlib and pandas in your pc/laptop with this command in command prompt:-
pip install numpy
pip install scipy
pip install matplotlib
pip install pandas
Go to https://pypi.org/project/wheel/#files and right-click on filename wheel-0.33.6-py2.py3-none-any.whl (21.6 kB) and copy link address. Then go to your pc/laptop, open command prompt and write this command "python -m pip install" after this command space first then paste the link copied. After installing successful go to the next step.
Then go to this link, https://pypi.org/simple/dlib/ and right-click on filename "dlib-19.8.1-cp36-cp36m-win_amd64.whl" then copy link address. Then open command prompt and do the same as step 2 which is, write this command "python -m pip install" after this command space first then paste the link copied. then the dlib will be installed successfully.
After that, type python and enter, then type import dlib to check dlib is installed perfectly. you can proceed to install face recognition.py which suite for python 3.6.
As you can see many answers above, But i would like to post a quick solution which works for sure in Anaconda3. I haven't chosen Visual Studio as it consumes lot of memory.
Please follow the below steps.
Step 1:
Install windows cmake.msi and configure environment variable
Step 2:
Create a conda environment, and install cmake using the below command.
pip install cmake
Step 3:
conda install -c conda-forge dlib
Note you can find few other dlib packages, but the above one will works perfectly with this procedure.
dlib will be successfully installed.
You need to install Cmake.
dlib is an c++ libary with python bindings. It needs to be builded first. My guess is this will happen automatically once you have installed Cmake
So basically I have been searching the solution for two days.
I tried everything
Installing Cmake
Adding path
installing dlib from the links mentioned in the answers
Installing ## Heading ## numpy, scipy, matplotlib, pandas
etc etc etc
BUT THE ONLY SOLUTION THAT WORKED WAS
INSTALLING MICROSOFT VISUAL STUDIO C++
After installing MS VS C++ I ran command pip install dlib and it is working like a charm.
BEST OF LUCK
Link to download Visual Studio C++
https://visualstudio.microsoft.com/thank-you-for-downloading-visual-studio-for-cplusplus/?sku=Community&rel=16&rid=30005
You have to install cmake as the error tells you.
you can follow this instructions https://www.learnopencv.com/install-dlib-on-windows/
or directly install cmake from here https://cmake.org/download/
Once cmake is installed pip install dlib should work.
I had vstudio building tools installed whe I did my test.
Choose dlib .whl file according to your installed python version.
For example if installed python version is 3.6.7 , 64bit system or if python is 3.5.0 32 bit
then choose dlib-19.5.1-cp36-cp36m-win_amd64.whl and dlib-18.17.100-cp35-none-win32.whl respectively.
Bolded text says the python supporting version.
Download wheel file from here or copy the link address
pip install dlib-19.5.1-cp36-cp36m-win_amd64.whl
for above method .whl file shoud be in the working directory
or
Below link for python3.6 supporting dlib link, for python 3.5 u can replace with dlib 35.whl link
pip install https://files.pythonhosted.org/packages/24/ea/81e4fc5b978277899b1c1a63ff358f1f645f9369e59d9b5d9cc1d57c007c/dlib-19.5.1-cp36-cp36m-win_amd64.whl#sha256=7739535b76eb40cbcf49ba98d894894d06ee0b6e8f18a25fef2ab302fd5401c7
1.use python 3.6.9 version
2.first install cmake.
conda install -c anaconda cmake
use these command to install dlib
pip install https://pypi.python.org/packages/da/06/bd3e241c4eb0a662914b3b4875fc52dd176a9db0d4a2c915ac2ad8800e9e/dlib-19.7.0-cp36-cp36m-win_amd64.whl#md5=b7330a5b2d46420343fbed5df69e6a3f
Just a quick update on what has worked for me (two years later). Davis King has provided two ways to add the latest python dlib (19.17.0) to any python environment in Windows 10 for me. Note, I run several Linux configs in Oracle VirtualBox but Windows 10 is my native OS which has access to the Nvidia GPU so i need an install on Windows 10. (Cannot access the GPU - easily - through VirtualBox).
First - the easiest:
pip install dlib
and the website link: https://pypi.org/project/dlib/
And then it can be easily be build from sources. Download from https://pypi.org/simple/dlib/ and follow instructions on http://dlib.net/compile.html.
Also, just found another way to access with Visual Studio 2019 (or 2017). Use vcpkg - see link https://vcpkg.readthedocs.io/en/latest/
I built dlib 19.17 on Windows 10 with CMake and it worked fine but then I found vcpkg and now the dlib libraries are integral to the Visual Studio. I no longer need to add all the external links to C++ and the linker.The version in vcpkg is currently 19.16-1 and it is built with full CUDA support.
Hope this helps others..
You can use vcpkg to install dlib.
If you don't have vcpkg, you can get it here (Read Quick Start)
After you got vcpkg, run:
vcpkg install dlib:x64-windows
I have recently installed dlib on python 3.7.
First I have installed cmake from anaconda navigator (cmake version 3.14.0)
Next i installed visual studio 2019 and installed Desktop development with C++ .
Then I do pip install dlib and now its working
None of the answers worked for me. This is what worked
Assuming you have anaconda python 3.7 installed
1) Dowload and install cmake(make sure to check the option to add cmake to system path during installation to avoid manually doing later)
Download from this link cmake download
2) conda install -c conda-forge dlib
It is basically a two-step process:
install cmap
pip install cmap
install dlib
pip install https://pypi.python.org/packages/da/06/bd3e241c4eb0a662914b3b4875fc52dd176a9db0d4a2c915ac2ad8800e9e/dlib-19.7.0-cp36-cp36m-win_amd64.whl#md5=b7330a5b2d46420343fbed5df69e6a3f
If you're trying to install dlib on Windows 10 with Visual Studio 2019, then first perform:
pip install cmake
And set it in the environment variable. After that, make sure that you have the latest version of Visual Studio SDK installed. After that, perform:
pip install dlib
I hope this solves the problem
Update/Install Visual C++
Maybe try installing/updating Visual C++. Because this is necessary for CMake to run. You can install it from here, https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15#
Installation with Wheel File
Run this:
pip install https://pypi.python.org/packages/da/06/bd3e241c4eb0a662914b3b4875fc52dd176a9db0d4a2c915ac2ad8800e9e/dlib-19.7.0-cp36-cp36m-win_amd64.whl#md5=b7330a5b2d46420343fbed5df69e6a3f
Installation from Internet
Install CMake from https://cmake.org/download/
Run this,
set PATH="%PATH%;C:\Program Files\CMake\bin
to add CMake to your path. You can also do this manually by Editing The Environment Variables.
3)Download the following,
https://pypi.org/project/dlib/#files.
In the specified folder in which you extracted the install files run the following,
python setup.py install.
Simple and 100% working trick
(Make sure you install cmake)
My Anaconda python ver : 3.6.8 (64 bit) | OS :Windows 10
python -m pip install https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0694c5d703c8e037e6aba2e865f9bae22ed63c/dlib-19.8.1-cp36-cp36m-win_amd64.whl#sha256=794994fa2c54e7776659fddb148363a5556468a6d5d46be8dad311722d54bfcf
Install dlib in Windows
download dlib from https://github.com/davisking/dlib.git
download camke from https://cmake.org/download/
Extract cmake and configure it as Environment variable to the extracted path my it was C:\Users\admin\Downloads\cmake-3.8.1-win32-x86\cmake-3.8.1-win32-x86\bin
Now extract dlib zip file and go to dlib folder
Follow this commands
cd dlib/test
mkdir build
cd build
cmake ..
cmake --build . --config Release
Now go to Release folder which would be at dlib\test\build\Release and execute this command
dtest.exe --runall
This process takes time as cmake compiles all C++ files so stay clam.
Enjoy!!!

Installing NumPy and SciPy on 64-bit Windows (with Pip)

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"

Installing scikit-learn 0.15 (Python)

I'm currently using scikit-learn 0.14.1, which I installed using pip. I'm running Python version 2.7.6 (64 bit), using Canopy Enthought as my IDE. My operating system is OSX 10.9.2
Currently, I am trying to install scikit-learn 0.15. I cloned the repository into my home directory, cd'ed into it, and typed 'python setup.py install' into the command line.
I got an error saying:
error: could not delete '/Users/*****/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/sklearn/__check_build/__init__.py': Permission denied
Anyone have any advice on how I should go about installing scikit-learn 0.15? Should I have cloned the directory into /Users/*****/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/ ?
Thanks so much!
A way of installing many python packages, amongst which scikit-learn, without needing root priviledges is to install it locally
python setup.py install --user
which will write information to ~/.local.
A second option is
python setup.py develop
which will compile in place and place a symbolic link in /Users/*****/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/. You may have to sudo and you may have to delete the old sklearn.
A third, more explicit way of doing this is to place the symbolic link yourself, which will require surgical, but very localized use of sudo for placing the link and removing the old scikit learn.
Assuming you cloned into ~/scikit-learn/
cd ~/scikit-learn
make in
cd /Users/*****/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/
sudo mv sklearn sklearn_
sudo ln -s ~/scikit-learn/sklearn sklearn
More detailed information on the website about installing in general and installing the bleeding edge

Categories