I am trying to upgrade package of scikit-learn from 0.16 to 0.17. For that I am trying to use binaries from this website: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scikit-learn. I have Windows 7 x64 bit. I downloaded the relevant package locally and gave following commands and got Requirement already up-to-date:
C:\Users\skumar>pip install --upgrade --use-wheel --no-index --find-links=../../
SOURCE/APPS scikit-learn
Ignoring indexes: https://pypi.python.org/simple
Requirement already up-to-date: scikit-learn in c:\anaconda3\lib\site-packages
Then I tried to upgrade it from remote site and got similar result:
C:\Users\skumar>pip install --upgrade --use-wheel --no-index --trusted-host www.
lfd.uci.edu --find-links=http://www.lfd.uci.edu/~gohlke/pythonlibs/ scikit-learn
Ignoring indexes: https://pypi.python.org/simple
Requirement already up-to-date: scikit-learn in c:\anaconda3\lib\site-packages
On Remote site there are two versions i.e., 0.16 & 0.17. Is there a way to specify version in command? Or how do you install/upgrade wheel file?
Anaconda comes with the conda package manager which is designed to handle these kinds of upgrades. Start by updating conda itself to get the most recent package lists:
conda update conda
And then install the version of scikit-learn you want
conda install scikit-learn=0.17
All necessary dependencies will be upgraded as well. If you have trouble with conda on Windows, there are some relevant FAQ here: http://docs.continuum.io/anaconda/faq
Following Worked for me for scikit-learn on Anaconda-Jupyter Notebook.
Upgrading my scikit-learn from 0.19.1 to 0.19.2 in anaconda installed on Ubuntu on Google VM instance:
Run the following commands in the terminal:
First, check existing available packages with versions by using:
conda list
It will show different packages and their installed versions in the output. Here check for scikit-learn. e.g. for me, the output was:
scikit-learn 0.19.1 py36hedc7406_0
Now I want to Upgrade to 0.19.2 July 2018 release i.e. latest available version.
conda config --append channels conda-forge
conda install scikit-learn=0.19.2
As you are trying to upgrade to 0.17 version try the following command:
conda install scikit-learn=0.17
Now check the required version of the scikit-learn is installed correctly or not by using:
conda list
For me the Output was:
scikit-learn 0.19.2 py36_blas_openblasha84fab4_201 [blas_openblas] conda-forge
Note: Don't use pip command if you are using Anaconda or Miniconda
I tried following commands:
!conda update conda
!pip install -U scikit-learn
It will install the required packages also will show in the conda list but if you try to import that package it will not work.
On the website http://scikit-learn.org/stable/install.html it is mentioned as:
Warning To upgrade or uninstall scikit-learn installed with Anaconda or conda you should not use the pip.
So to upgrade scikit-learn package, you have to follow below process
Step-1: Open your terminal(Ctrl+Alt+t)
Step-2: Now for checking currently installed packages along with the
versions installed on your
conda environment by typing conda list
Step-3: Now for upgrade type below command
conda update scikit-learn
Hope it helps!!
I would suggest using conda. Conda is an anconda specific package manager. If you want to know more about conda, read the conda docs.
Using conda in the command line, the command below would install scipy 0.17.
conda install scipy=0.17.0
Updating a Specific Library - scikit-learn:
Anaconda (conda):
conda install scikit-learn
Pip Installs Packages (pip):
pip install --upgrade scikit-learn
Verify Update:
conda list scikit-learn
It should now display the current (and desired) version of the scikit-learn library.
For me personally, I tried using the conda command to update the scikit-learn library and it acted as if it were installing the latest version to then later discover (with an execution of the conda list scikit-learn command) that it was the same version as previously and never updated (or recognized the update?). When I used the pip command, it worked like a charm and correctly updated the scikit-learn library to the latest version!
Hope this helps!
More in-depth details of latest version can be found here (be mindful this applies to the scikit-learn library version of 0.22):
Release Highlights for scikit-learn 0.22
I made it work to update to 0.24.1, on Windows 10 64bits, so I share the way I did it with the GUI:
launch Anaconda3 gui
on the left menu, click "environments"
next to "base (root)", click on the green arrow/triangle
select "Open Terminal"
type the command line:
conda install scikit-learn==0.24.1
It worked without error.
If you are using Jupyter in anaconda, after conda update scikit-learn in terminal, close anaconda and restart, otherwise the error will occur again.
Related
This error raised while installing geopandas. I've looking for its solution on the web, but none of them really explain what happened and how to solve it..
This is the full error:
Collecting geopandas
Using cached https://files.pythonhosted.org/packages/24/11/d77c157c16909bd77557d00798b05a5b6615ed60acb5900fbe6a65d35e93/geopandas-0.4.0-py2.py3-none-any.whl
Requirement already satisfied: shapely in c:\users\alvaro\anaconda3\envs\tfdeeplearning\lib\site-packages (from geopandas) (1.6.4.post2)
Requirement already satisfied: pandas in c:\users\alvaro\anaconda3\envs\tfdeeplearning\lib\site-packages (from geopandas) (0.20.3)
Collecting fiona (from geopandas)
Using cached https://files.pythonhosted.org/packages/3a/16/84960540e9fce61d767fd2f0f1d95f4c63e99ab5d8fddc308e8b51b059b8/Fiona-1.8.4.tar.gz
Complete output from command python setup.py egg_info:
A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Alvaro\AppData\Local\Temp\pip-install-oxgkjg8l\fiona\
pip install wheel
pip install pipwin
pipwin install numpy
pipwin install pandas
pipwin install shapely
pipwin install gdal
pipwin install fiona
pipwin install pyproj
pipwin install six
pipwin install rtree
pipwin install geopandas
here are the source links:
http://geopandas.org/install.html#installation
https://pip.pypa.io/en/latest/user_guide/#installing-from-wheels
https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
If you still have problems, consider uninstalling the above (pip uninstall) and reinstalling.
I solved this problem by running the following commands:
pip install pipwin
pipwin install gdal
pipwin install fiona
pip install geopandas
Works successfully on Windows.
Geospatial Data Abstraction Library (GDAL) is a library designed for vector geospatial data formats. It's a prerequisite for installing Fiona, the Python API for OGR (which doesn't really stand for anything), which is in turn a prerequisite for Geopandas. On UNIX-like systems the gdal-config script tells Fiona stuff about your particular gdal installation.
It seems that your gdal-config is not in one of the usual places on your PATH, so Fiona was unable to find it.
If you're using Anaconda, best is to remove gdal with conda remove gdal and then do a fresh conda install geopandas.
As a general rule, if you're using Conda you should never use pip to install something inside it unless you're absolutely sure conda offers no support for it. (Many package can be found on conda by specifying the right channel - -c argument.) And specifically in the case of geopandas, the maintainers recommend using conda over pip, since pip requires you to install the dependencies correctly.
I had a lot of issues myself installing geopandas, mostly showing error when downloading fiona and gdal. I did every step above and did a conda install geopandas but failed. The only thing worked for me is to install fiona and gdal wheel separately.
go to the link by Christoph: gohlke:https://www.lfd.uci.edu/~gohlke/pythonlibs/#fiona
You can search for fiona and gdal wheel files. Make sure you choose the file as per your python version, if it is 3.7 then there would be cp37.
Download the file
go to command prompt, put cd and then pip install , install GDAL wheel file, then fiona, then just do pip install geopandas.
This solution worked for me.
To install gdal, I followed the following steps:
downloaded the version that satisfies my computer (64 bit) from
https://www.lfd.uci.edu/~gohlke/pythonlibs/ . The file was GDAL-3.1.4-cp37-cp37m-win_amd64.whl
Put the file in a folder on the desktop.
From cmd, i moved to that directory and executed python -m pip install GDAL-3.1.4-cp37-cp37m-win_amd64.whl
This is followed by installing fiona the same way: python -m pip install Fiona-1.8.18-cp37-cp37m-win_amd64.whl
For shapely, i executed conda install -c conda-forge shapely
After that, i was able to install keplergl as usual: pip install keplergl
install descartes: conda install -c conda-forge descartes (or python -m pip install descartes).
In this way, i didn't have to play around with the 'Environmental Variables' as this may affect other programs
Cheers..
Installing geopandas
Geopandas has very complex multi-language dependencies, some of which need to be built with consistent compiler versions across packages. Because of this, the geopandas docs recommend installing using conda in a new environment using conda-forge only. Here are some general best practices to keep in mind:
conda is the recommended installation method. You can install geopandas from pip or source, but it's going to be a bumpy ride and it's not recommended. If you're installing conda for the first time, I recommend you start with miniconda (or better yet miniforge, a conda-forge-first miniconda variant), not anaconda, to keep your base env lean.
When using conda, you should not mix and match conda channels.
When installing geopandas, try creating a fresh environment rather than installing into your base environment. If you have anaconda installed, it comes with a large number of packages from the "defaults" channel installed in your base environment. I recommend deleting anaconda and installing miniconda, then installing into a new environment.
Try to create a new environment with everything you plan to use all at once rather than iteratively modifying the environment. In other words, if you want to use geopandas with scikit_learn, folium, and rasterio, install them together with a single conda create command
As a last resort, delete your conda installation and re-install miniconda. Desperate times call for desperate measures, and this usually resolves gnarly installation nightmares.
To create a fresh conda environment in which you install all necessary dependencies at the same time, using the conda-forge channel:
conda create -n my-geopandas-env -c conda-forge geopandas [all other packages you need]
For example, I might set up an environment with something along the lines of...
conda create -n my-geopandas-env -c conda-forge python=3.9 \
ipython ipykernel geopandas scipy seaborn fiona matplotlib cartopy
Bundling your installations into a single environment creation step like this reduces the chance of packages falling out of sync. To speed this process up, you could first install mamba or mambaforge, a faster drop-in replacement for conda, into your base environment and then run the above commands with mamba instead of conda.
Generally, it's best to avoid installing much of anything in your base environment (cross-environment system utilities like mamba are some of the few exceptions). If you already have a complex base environment (maybe you started with anaconda rather than miniconda) this may be the time to delete your entire conda installation and start from scratch (I know that's terrifying... sorry! but it'll save you heartache in the future). mamba is great for speeding this process up.
Connecting your editor to the conda environment
Once you have installed all of the packages you need, activate your environment with conda activate my-geopandas-env. See the conda guide to managing environments for more info.
Jupyter/ipython
Some editors/IDEs including jupyter require additional packages - jupyter requires that ipython and ipykernel be installed in order to load the environment within the notebook or editor - that's why I included ipykernel in my list above. See the ipykernel docs for more info.
Other IDES
To link this environment to an IDE such as VSCODE, spider, etc., find the location of this python version with conda run -n my-geopandas-env which python then point your editor to this python executable. Check the docs of your specific editor to get more targeted info about how to set up a conda environment for use with your editor:
Spider: FAQ on using an existing environment and Spider wiki guide to working with packages and environments
VSCode: Using python environments in vscode
PyCharm: Configure a conda virtual environment
I don't have conda installed, then using just pip I followed these steps:
Download GDAL and Fiona wheels directly on:
GDAL: https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal
FIONA: https://www.lfd.uci.edu/~gohlke/pythonlibs/#fiona
Then:
pip install <gdal.whl>
pip install <fiona.whl>
In my case I did pip install GDAL-3.4.1-cp38-cp38-win_amd64.whl and Fiona-1.8.21-cp38-cp38-win_amd64.whl. Where cp38 stands for python 3.8.
After that you are able to install geopandas with pip as well.
pip install geo pandas
For me, the only solution was to install the ready binaries from here
https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal
Then just install locally
pip install GDAL-3.1.4-cp38-cp38-win_amd64.whl
One way in which I could install geopandas was through the Anaconda Navigator. Get into the environment and install the package 'geopandas'. After that I could import the geopandas package in spyder
I will add
!pip install descartes
to #JDOaktown list.
I started with pip install geopandas and got the error, but later tried with conda install --channel conda-forge geopandas and the error disappeared.
Successfully installed in RHEL 7.8.
It automatically downloaded the required packages. This might be helpful
Installing collected packages: certifi, pyproj, shapely, attrs, click, click-plugins, munch, cligj, fiona, geopandas
Successfully installed attrs-20.3.0 certifi-2020.11.8 click-7.1.2 click-plugins-1.1.1 cligj-0.7.0 fiona-1.8.17 geopandas-0.8.1 munch-2.5.0 pyproj-3.0.0.post1 shapely-1.7.1
If you want to install GDAL, Geopandas, Shapely, Fiona etc in a windows Virtual Environment download .whl files for all of them and first install GDAL using
pip install gdal-.whl
Following this command edit the activate.bat file in you venv\Scripts folder and add
GDAL_CONFIG = \venv\Lib\site-packages\osgeo
Then you can install rest using pip install
I started off with a clean environment gdal_test in Conda environments, but made the mistake of using the old activate gdal_test instead of conda activate gdal_test. This made Conda Environment resolving take forever, which is why I resolved to other methods at first.
Takeaway: let conda handle it, with a proper new environment.
I ran into this problem not with anaconda/windows, but with python:3.6 Docker image. Google search always led me to this question, so I think I will share how I resolve my issue in case others also end up here.
Based on here, you need to install system relevant packages in the Dockerfile before running pip install geopandas or pip install requirements.txt:
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libatlas-base-dev \
libgdal-dev \
gfortran
The following worked on macOS:
brew install gdal --HEAD
Verify the installation by running gdal-config --version
Following that pip installation as normal worked without a problem.
I installed the latest version of Python (3.6.4 64-bit) and the latest version of PyCharm (2017.3.3 64-bit). Then I installed some modules in PyCharm (Numpy, Pandas, etc), but when I tried installing Tensorflow it didn't install, and I got the error message:
Could not find a version that satisfies the requirement TensorFlow (from versions: )
No matching distribution found for TensorFlow.
Then I tried installing TensorFlow from the command prompt and I got the same error message.
I did however successfully install tflearn.
I also installed Python 2.7, but I got the same error message again. I googled the error and tried some of the things which were suggested to other people, but nothing worked (this included installing Flask).
How can I install Tensorflow? Thanks.
The latest requirements for running TensorFlow are documented in the installation documentation.
TensorFlow only supports 64-bit Python
TensorFlow only supports certain versions of Python (for example, Python 3.6 is not supported)
So, if you're using an out-of-range version of Python (older or newer) or a 32-bit version, then you'll need to use a different version.
I installed it successfully by pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl
There are a few important rules to install Tensorflow:
You have to install Python x64. It doesn't work with x86/32b and it gives the same error as yours.
Python versions later than 3.8 and Python 3.8 requires TensorFlow 2.2 or later. Check for supported Python versions.
For example, for TensorFlow 2.9, you can install Python3.8.6-64bit and it works like a charm. Check the latest information on the website.
if you are using anaconda, python 3.7 is installed by default, so you have to downgrade it to 3.6:
conda install python=3.6
then:
pip install tensorflow
it worked for me in Ubuntu.
I am giving it for Windows
If you are using python-3
Upgrade pip to the latest version using py -m pip install --upgrade pip
Install package using py -m pip install <package-name>
If you are using python-2
Upgrade pip to the latest version using py -2 -m pip install --upgrade pip
Install package using py -2 -m pip install <package-name>
It worked for me
Tensorflow 2.2.0 supports Python3.8
First, make sure to install Python 3.8 64bit. For some reason, the official site defaults to 32bit. Verify this using python -VV (two capital V, not W). Then continue as usual:
python -m pip install --upgrade pip
python -m pip install wheel # not necessary
python -m pip install tensorflow
As usual, make sure you have CUDA 10.1 and CuDNN installed.
Tensorflow isn't available for python 3.8 (as of Dec 4th 2019) according to their documentation page. You will have to downgrade to python 3.7.
I am using python 3.6.8, on ubunu 18.04, for me the solution was to just upgrade pip
pip install --upgrade pip
pip install tensorflow==2.1.0
Uninstalling Python and then reinstalling solved my issue and I was able to successfully install TensorFlow.
Python version is not supported
Uninstall python
https://www.python.org/downloads/release/python-362/
You should check and use the exact version in install page.
https://www.tensorflow.org/install/install_windows
python 3.6.2 or python 3.5.2 solved this issue for me
(as of Jan 1st, 2021)
Any over version 3.9.x there is no support for TensorFlow 2. If you are installing packages via pip with 3.9, you simply get a "package doesn't exist" message. After reverting to the latest 3.8.x. Thought I would drop this here, I will update when 3.9.x is working with Tensorflow 2.x
So here's the message that I got on a M1 Pro while I was executing
python -m pip install tensorflow-macos
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
I then re-installed python from the official source:
https://www.python.org/downloads/macos/
(Yes, as stupid as it seems.)
I then followed the Apple tutorial for Monterey:
https://developer.apple.com/metal/tensorflow-plugin/
Everything was solved by then.
Apple Silicon (M1+ Chip)
If you are using a Mac with an M1 chip or higher, you need to install Tensorflow metal plugin for compatability with your architecture.
Simple installation instructions for Tensor Flow are found on Apple's website: https://developer.apple.com/metal/tensorflow-plugin
Looks like the problem is with Python 3.8. Use Python 3.7 instead. Steps I took to solve this.
Created a python 3.7 environment with conda
List item Installed rasa using pip install rasa within the environment.
Worked for me.
Running this before the tensorflow installation solved it for me:
pip install "pip>=19"
As the tensorflow's system requirements states:
pip 19.0 or later
For version TensorFlow 2.2:
Make sure you have python 3.8
try:
python --version
or
python3 --version
or
py --version
Upgrade the pip of the python which has version 3.8
try:
python3 -m pip install --upgrade pip
or
python -m pip install --upgrade pip
or
py -m pip install --upgrade pip
Install TensorFlow:
try:
python3 -m pip install TensorFlow
or python -m pip install TensorFlow
or py -m pip install TensorFlow
Make sure to run the file with the correct python:
try:
python3 file.py
or python file.py
or py file.py
1.Go to https://www.tensorflow.org/install/pip website and look if the version you are using support the Tensorflow. some latest version does not support Tesnsorflow. until Tensorflow releases its latest version for that Python version.
you must have 64 bit python installed
have latest version of pip installed
pip install --upgrade pip
using pip install tensorflow --user did it for me
I had this problem on my macOS (with M1 Pro) even with the latest 64-bit Python and the latest pip installed. This is how I've solved it. Try to run:
pip install tensorflow-macos
If you will get the error ending like this (like I did)...
...
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
...then simply run:
pip install --default-timeout=100 tensorflow-macos
Tensorflow seems to need special versions of tools and libs.
Pip only takes care of python version.
To handle this in a professional way (means it save tremendos time for me and others)
you have to set a special environment for each software like this.
An advanced tool for this is conda.
I installed Tensorflow with this commands:
sudo apt install python3
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
sudo apt install python3-pip
sudo apt-get install curl
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
yes
source ~/.bashrc
installs its own phyton etc
nano .bashrc
maybe insert here your proxies etc.
conda create --name your_name python=3
conda activate your_name
conda install -c conda-forge tensorflow
check everything went well
python -c "import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))"
PS: some commands that may be helpful
conda search tensorflow
https://www.tensorflow.org/install/pip
uses virtualenv. Conda is more capable. Miniconda ist sufficient; the full conda
is not necessary
use python version 3.6 or 3.7 but the important thing is you should install the python version of 64-bit.
In case you are using Docker, make sure you have
FROM python:x.y.z
instead of
FROM python:x.y.z-alpine.
This issue also happens with other libraries such as matplotlib(which doesn't support Python > 3.9 for some functions) let's just use COLAB.
Slightly different issue for me but I will still post an answer here. tensorflow package is working, but not tflite-runtime.
pip install --extra-index-url https://google-coral.github.io/py-repo/ tflite-runtime==2.5.0
I solved the same problem with python 3.7 by installing one by one all the packages required
Here are the steps:
Install the package
See the error message:
couldn't find a version that satisfies the requirement -- the name of the module required
Install the module required.
Very often, installation of the required module requires the installation of another module, and another module - a couple of the others and so on.
This way I installed more than 30 packages and it helped. Now I have tensorflow of the latest version in Python 3.7 and didn't have to downgrade the kernel.
I would like to know if anyone knows how can I install tensorflow==2.0.0-alpha0 in a conda enviroment using python 3.7. Is it possible to use python 3.7 or do I have to downgrade to 3.6. Either way what is the command I need to use because the following don't find any package
conda install tensorflow==2.0.0-alpha0
conda install tensorflow
conda install tensorflow=2.0.0-alpha0
I am using fedora 29 and conda 4.6.8
Thanks!
TENSORFLOW 2.0 release version is out!
Since 01/10/2019 I'm not talking beta but the release version.
Using Anaconda
Since 01/11/2019 Anaconda is supporting the Tensorflow 2.0.0.
Option 1: For what the easiest way is just:
conda install tensorflow or conda install tensorflow-gpu
For the gpu mode, anaconda will take care of all the CUDA everything you need to install for the tensorflow gpu mode to work so I strongly recommend using this method.
The only issue with this method is that anaconda might not have the last last version of TensorFlow. For example, at Feb 21 2021, conda has the version 2.3 whereas the PIP version is 2.4. You can check the current version of gpu or cpu.
Option 2 (virtual env): It is strongly recommended to use an environment on where to install tensorflow, for which you need the following command that will create an environment first and then install tensorflow within:
CPU: conda create -n <your_env_name> tensorflow
GPU: conda create -n <your_env_name> tensorflow-gpu
Change <your_env_name> by a meaningful name like tf-2
To use tensorflow run first conda activate <your_env_name>
Using pip
Using pip the tensorflow official instructions are quite complete.
Just install tensorflow using pip like:
# Current stable release for CPU-only
pip install tensorflow
I yet recommend before doing everything to install tensorflow in a new environment so the 3 steps would be (with anaconda):
conda create --n <our_env_name> pip
conda activate <your_env_name>
pip install tensorflow
Now for the GPU version it's harder with pip, I recommend you this link that explains the extra things you need to install (CUDA and others).
It could be the case that the package version you want is not available in conda-forge. What you could do is install packages with pip in your conda environment.
pip install tensorflow==2.0.0-alpha0
Also the requirements don't state python 3.7, you can try your luck or downgrade to python 3.6.
You can now install TF2 for Python 3.7 using conda. You can run the usual
$ conda install tensorflow=2.0 python=3.7
or
$ conda install tensorflow-gpu=2.0 python=3.7
for the GPU version.
My preferred approach however would be to manage the dependencies using an environment.yml file. You can find examples of how to do this for TF2 and dependencies in these template repos that I created on GitHub.
https://github.com/kaust-vislab/tensorflow-cpu-data-science-project
https://github.com/kaust-vislab/tensorflow-gpu-data-science-project
The problem is in conda install tensorflow.
conda does not have tensorflow. You will require to install tensorflow using pip. You do not need to downgrade your Python. It will work with Python 3.7.
Use this
$ pip install --upgrade tensorflow==2.0.0-beta0
Since the beta0 version is released, I mentioned that. You can choose other tf version.
I recommend going through this post on TowardsDataScience: Step-by-Step Guide to Install Tensorflow 2.0.
This post covers installation steps with conda.
You might want to take a look at this link: https://pypi.org/project/tf-nightly-2.0-preview/#files to see which python version and OS supports your package
I tried to install tensorflow v2 with conda install tensorflow or conda install tensorflow-gpu only to get lots of incompatible dependencies.
Just run
pip install -upgrade tensorflow-gpu
or
pip install tensorflow-gpu=2.0.0 for a specific version
Use ' pip install tensorflow-gpu '. This command does the job - downloads Tensorflow-gpu = 2.4.1
I'm using python 3.x in my windows 7. The pandas version in my system is 0.20.3. As per my project requirement, I need to install Pandas version 0.19.2 Can you suggest me how to do that?
I also tried to install it using anaconda prompt & I got following message given in screen shot
Assuming pandas was installed with pip, you can simply redo the install with the desired version. If it was installed by some other method, the below may not work.
In a command terminal:
pip install pandas==0.19.2
In the output, you should see mention of the previous version being uninstalled.
There's an incompatibility version between pandas and your blaze package. It also does not have a fixed version, so the incompatibility can appear any time.
You can downgrade two packages at once:
conda install pandas==0.25 python==3.7
I'd uninstall blaze, downgrade pandas and try to reinstall blaze again.
It is always a good practice to fix your package versions and commit them to your version control. Use this command:
conda env export -f environment.yml
It will save every version of your pandas and pip packages. Add it to your version control.
BTW, I prefer to export using the option --from-history. It will export just the libs you explicitly installed, and not the dependencies:
conda env export --from-history > environment.yml
It will prevent a lot of troubles.
Note: for --from-history to work fine, you must have fixed your package version when installing packages: conda install pandas==0.25. Do not install without a version number: conda install pandas
While the above answers propose a solution, note that if you want to downgrade a version of preinstalled package pip install is not enough.
Instead one needs to tell pip to uninstall the previous version if it is not the required one. (With the not so intuitive flag --upgrade)
For example:
pip install --upgrade pandas==0.19.2
Error solve as I have changed pandas version manually in requrments.txt file
I know that there exists a link for installing Tensorflow for python 3.5 on
Windows Installation link. There also a similar question on StackOverflow link also, but it case when I use this command:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl
But it said Wheel package needs to be updated. So I updated it using pip and ran the application once again. The output was
tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl is not a supported wheel on this platform.
So how do I solve this problem ? Please help.
I've tried to install the cpu version of TensorFlow.
conda upgrade conda
conda upgrade --all
conda create -n tensorflow python=3.5.
activate tensorflow
conda install -c conda-forge tensorflow
This will create an "environment" that will contain all of your packages you need (the example above is just tensorflow) and you will be able to import that library while you are in that environment anaconda is really just used to manage packages and segregate projects that require different packages
When your finished with your environment, to close out use:
deactivate
these commands are slightly different on OSX/Linux so be sure to look them up if you are on a different operating system
If you are using TF for some machine learning then you will probably want these packages in your environment as well:
conda install pandas matplotlib jupyter notebook scipy scikit-learn
Place that line between (activate tensorflow) and (conda install)
The executable, Anaconda for python 3.5 is not available on the official website.
An alternative to downloading that version is to download the latest version of Anaconda(3.6 as of 9 May, 2017), open your cmd shell in windows and execute the following commands. Note that the activate command is not fully supported in Windows Powershell. Click here to see why.
conda create --name tensorflow python=3.5
activate tensorflow
conda install -c conda-forge tensorflow=1.0.0
The answer has been borrowed from Anaconda Public Google Group.