Couldn't install scikit - scikit-learn

While installing scikit learn this is what I get in terminal:
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'd:\anaconda\lib\site-packages\scipy\interpolate\dfitpack.cp37-win_amd64.pyd'
Consider using the --user option or check the permissions.
How do I find the main user folder?
I've tried this code:
pip install -U scikit-learn scipy matplotlib

Try to install packages using anaconda navigator. Launch the app then go to environments and select the packages that you want to install and then click apply.

Its not a problem to install libs with pip as long as your conda config has pip installed.
To your problem:
either do sudo pip install -U scikit-learn scipy matplotlib
or as state pip install -U scikit-learn scipy matplotlib --user
Your problem is with the permissions because you probably do not have an vena active.

Related

Can't install PymuPDF although python Libary have PymuPDF

I tried to install PyMuPDF on Python 3.9 when first I installed by pip install PymuPDF and re-checked by pip list like this"
But when I imported PyMuPDF:
ModuleNotFoundError: No module named 'PyMuPDF'
Next, I tried to install PymuPDF from doc, it said I need install MuPDF first, and install with Wheel, I tried both:
pip install C:\Users\Admin\Desktop/PyMuPDF-1.19.6-cp310-cp310-win_amd64.whl and pip install PyMuPDF-1.19.6-cp310-cp310-win_amd64.whl but reviced error:
yMuPDF-1.19.6-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.
What should i do to install PyMuPDF, thank you all.
PyMuPDF is available with a wheel under all Windows versions - you should have no problem at all.
But please follow this procedure:
Make sure your pip is the current one. This ensures that any changes in supported platform tags are known to pip.
Then install PyMuPDF.
So overall
py -3.10 -m pip install -U pip
py -3.10 -m pip install -U pymupdf
This should simply work!
In your script however you must do import fitz - this is the top-level name of the package.

how to use pip to install package to customized directory but respect dependencies

I want to use pip3 to install python package to /usr/lib/python3/dist-packages. For example, I want to install xgboost, so I try
sudo -H pip3 install -t /usr/lib/python3/dist-packages xgboost
The problem is such command also install dependencies numpy and scipy even though they already exist in /usr/lib/python3/dist-packages, and when I use
sudo pip3 uninstall xgboost
it complain xgboost is not installed.
What I want:
pip3 just install dependencies when they are not exist in /usr/lib/python3/dist-packages
pip3 uninstall xgboost can work
Any help? Thanks

i tried installing tensorflow using 'pip install tensorflow ' in anaconda prompt and command prompt. its showing following output

Found existing installation: wrapt 1.10.11
Cannot uninstall 'wrapt'. 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.
Try the below commands mentioned, it worked for me
conda update wrapt
pip install tensorflow
(1) First try to install wrapt manually using following command
pip install wrapt --upgrade --ignore-installed
make sure that you use "--ignore-installed" flag when install 'wrapt' as above mentioned command
(2) Then install tensorflow with pip
eg:
pip install tensorflow==1.14
this should work
You might want to upgrade numpy with following incase its not compatible otherwise it will throw errors.
pip install numpy --upgrade
I was getting this error while installing from conda environment. Always upgrade conda or pip before a new installation.
Following worked for me:
[Optional] If installing in conda environment, then temporarily remove the conda env:
conda remove --name myenv --all
Update all conda packages:
conda update --all
Create conda env again:
conda create -n myenv
Activate conda env:
conda activate
Install tensorflow:
pip install tensorflow

TensorFlow installation denied due to user permissions

I tried to run tensorflow on Jupiter netbook, python 2.7 but I realized it requiered 3.6 pythong version so I followed this steps :
Installing with Anaconda
Create a conda environment named tensorflow by invoking the following command:
C:> conda create -n tensorflow pip python=3.5
Activate the conda environment by issuing the following command:
C:> activate tensorflow
(tensorflow)C:> # Your prompt should change
Issue the appropriate command to install TensorFlow inside your conda environment. To install the CPU-only version of TensorFlow, enter the following command:
(tensorflow)C:> pip install --ignore-installed --upgrade tensorflow
To install the GPU version of TensorFlow, enter the following command (on a single line):
(tensorflow)C:> pip install --ignore-installed --upgrade tensorflow-gpu
**
But this line of code
**
(tensorflow)C:> pip install --ignore-installed --upgrade tensorflow
Show me the this error:
Could not install packages due to an EnvironmentError: [WinError 5]
Access is denied:
'C:\Users\idan\AppData\Local\Continuum\anaconda2\envs\tensorflow\Lib\site-packages\numpy\.libs\libopenblas.BNVRK7633HSX7YVO2TADGR4A5KEKXJAW.gfortran-win_amd64.dll'
Consider using the --user option or check the permissions.
I tried to change user permission and also open anaconda cmd as administrator but it doesn't help.
This answer has the necessary information for the pip permission error. It can be resolved with the --user flag, which is a conservative approach.
There is another way to install tensorflow for conda-environment. Write below on the Anaconda Command Prompt after activating environment.
conda install tensorflow
Test it :
python
import tensorflow as tf
And it should work.
I had the similar problem. The following solved mine.
Try updating the LD_LIBRARY_PATH using the following:
sudo ldconfig /usr/local/cuda/lib64
I found the solution from https://abdel.me/2017/09/28/aws-ami-deep-learning-keras/

Issue installing shapely Python Package

I am running python 3.6 on windows and am attempting to install Shapely using
pip install shapely==1.6b2
It is giving me the following errors
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Cameron\AppData\Local\Temp\pip-build-242ae_ih\shapely\
I have seen the other posts about this issue and have tried:
pip install --upgrade setuptools
pip install ez_setup
easy_install -U setuptools
Nothing seems to work and I am not sure what to do next. Any advice would be appreciated.
Thanks
You may try to use the binary from this unofficial site. Just use pip install {wheel file name} to install it.
Shapely‑1.5.17‑cp36‑cp36m‑win32.whl (32-bit)
Shapely‑1.5.17‑cp36‑cp36m‑win_amd64.whl (64-bit)
Hope this would make the installation easier.
I had a similar error for installing shapely-1.5.17 via pip install shapely, and installing this made the pip install command work thereafter:
sudo apt-get install libgeos-dev
As of 2020, you can now simply install Shapely for Windows with:
pip install shapely
(you many need --upgrade to get at least version 1.7.0, when binary wheels were added for Windows)

Resources