How do I install the "sparse_dot_topn" Package in Anaconda Installer? - python

I am trying to install the "sparse_dot_topn" package in Alibaba Cloud ECS instance. Firstly I tried to install it through the Anaconda installer.
conda install sparse_dot_topn
It throws like there is no package available
So I tried to install via pip
Pip install spare_dot_topn
But it throws me the following error
What am I missing? Please leave your suggestions

sparse_dot_topn requires Cython, try installing it this way:
pip install cython
pip install git+https://github.com/ing-bank/sparse_dot_topn.git

I have tried it first with pip install and failed. Then I tried within Anaconda terminal with the following comment and it was succesfull.
conda install -c conda-forge sparse_dot_topn

Related

Installing a repo not in PyPI

This is my first time trying to install a repo not in PyPI. I'm not sure if I'm having a general issue or a specific issue with the package.
Repo:
https://github.com/jeslago/epftoolbox
Instructions are:
git clone https://github.com/jeslago/epftoolbox.git
cd epftoolbox
Then, simply install the library using pip:
pip install .
I've tried several approaches.
I tried adding the repo in Pycharm, as "https://github.com/jeslago/epftoolbox.git/" in the settings.
I tried using pip install from a local version of the repo
python -m pip install C:\Users\user\epftoolbox\
I tried installing in anaconda
git clone https://github.com/jeslago/epftoolbox.git
cd epftoolbox
pip install .
I get this error
Successfully built epftoolbox termcolor
ERROR: tensorflow 2.3.0 has requirement scipy==1.4.1, but you'll have scipy 1.5.2 which is incompatible.
But it finishes with "Successfully installed epftoolbox-1.0"
The issue is that I can do "import epftoolbox"
Fine. But if I try and run a script with "from epftoolbox.data import read_data"
I get the error
ModuleNotFoundError: No module named 'epftoolbox.data'
So I take it that the package didn't actually install?
I'm not sure what to try next?
I've python 3.8.5 installed 64 bit.
I've get the same issue in pycharm and idle.
Probably you need to install specific version of scipy to work with this library, try to uninstall current version and then install the correct version with this commands:
python -m uninstall scipy
python -m install -Iv scipy==1.4.1

I am trying to install packages (Numpy) in Pycharm get pip error

I am new to python and trying to install Numpy package in pycharm but I get an error in return please help me solve this problem I have uploaded a picture of this error.
I attempted to install pip within pycharm interpreter still no luck!
Failed to install NumPy Package
This is because of a mismatch between your version of pip and numpy. See answer. Thus, first you must upgrade your pip:
On Linux or macOS:
pip install -U pip
On Windows:
python -m pip install -U pip
Once pip is updated, you may install numpy.

Why does pip install not work for catboost?

I have to install catboost but can not make it by pip install catboost.
There is not catboost library in Anaconda, so pip in the one way.
The error message is:
Could not find a version that satisfies the requirement catboost <for version: >
No matching distribution found for catboost.
Python version is 3.6.3.
Screenshot of error:
error message
I've tried :
pip install catboost==0.12.2
pip install catboost==0.12.1.1
pip install catboost==0.12.1
pip install catboost==0.12.0
and
pip install catboost==0.11.0
pip install catboost==0.10.2
None of these works.
Why does this problem appeared and is there another way to install catboost?
From the docs
Installation is only supported by the 64-bit version of Python.
You need to reinstall the 64 bit version of python to use the cat boost package
I had the same problem but it was mainly related to Docker because the error was only occurring when I was trying to install it through a docker - it turned out there is something related to M1 Apple architecture and the solution was to modify the docker command as following
docker buildx build --platform=linux/amd64 -t ${IMAGE_TAG} -f Dockerfile
For me the issue was I was developing on an M1 Mac. Trying to install as root, using conda and using docker images were all unsuccessful.
The fix I found was using the amd64 docker image as my base. The dockerfile code was:
FROM amd64/python:3.9-buster
RUN pip install -U pip
RUN pip install --upgrade setuptools
RUN pip install catboost
Can't exactly remember how I arrived at the above code, but thanks to https://github.com/prabodh1194 for putting this together. A dockerfile with this code can be found here (as of 25NOV2021) https://github.com/prabodh1194/docker_images/blob/main/catboost/0.26/Dockerfile
in my case, a virtual environment was using an old version of pip and a simple upgrade of pip worked!
python3 -m pip install --upgrade pip

pip install tensorflow throw error when it try to install related packeg:futures

Environment: python 3.6.2
When I try to install tensorflow-gpu with this command:
pip3 install --upgrade tensorflow-gpu
It throws an error message when it tries to install related packeg:futures
Unknown requires Python '>=2.6, <3' but the running Python is 3.6.2.
But futures is python2 only package.
How can I handle it?
I find the issue in github :
https://github.com/tensorflow/tensorflow/issues/16478
it should install futures first:
pip3 install futures==3.1.1
You can download the source from pypi futures-3.2.0.tar.gz and install.

install Tensorflow 1.0 on windows by Anaconda error

By following the instructions on Tensorflow website, I tried to install cpu-only version Tensorflow by Anaconda. However, the 4th step
(tensorflow)C:> pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl
outputs an error:
tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl is not a supported wheel on this platform. Could anyone tell me the reason behind this?
The command on the website is currently wrong. Replace x86_64 at the end of the URL with amd64 to get the correct command:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_amd64.whl
Alternatively you can use the following simpler command to install the latest CPU version:
pip install --ignore-installed --upgrade tensorflow
I think your problems could be one of this:
your python version is not Python3.5
Your system is not x64 windows.
So you can change install method below.
You can install tensorflow with pip direct like this:
pip install tensorflow
but this works only pip version > 9,
if you're using pip version under 9, you have to upgrade pip first.
you can upgrade your pip with this:
pip install -U pip
if you've installed python for all user, you might run this code with administrator account.

Categories

Resources