How to install scipy in Python3.5 virtual env | windows 10? - python

I have Anaconda (Python 3.6) in my Windows 10. This includes Scipy. I am also using a virtual Python 3.5 env to support TensorFlow. Now, the problem is that I cannot import Scipy while I'm inside this virtual env.
I have tried:
pip install scipy (didn't work)
easy-install scipy (didn't work)
I also visited http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy to look for suitable package to install but I could not figure out which numpy+mkl and scipy combination to download.
I'll be grateful for help. I know that there already exist similar questions on this issue. But I could not find answer to my problem anywhere.

Once you're inside your virtual environment for TensorFlow, try
conda install -c anaconda scipy=0.19.0

Try to create VirtualEnv with Python 3.5 as currently there is NO TensorFlow release for Python 3.6.
steps:
create Python 3.5 VirtualEnv:
conda create -n py35 python=3.5 anaconda
activate it
activate py35
install TensorFlow
conda install --channel https://conda.anaconda.org/conda-forge tensorflow

Related

is it any quick way to install package in PyCharm using pip when using conda environment

I am using conda as the Python3 package management tool, sometimes the conda repo did not contains some Python package. So I have to install it using pip, first I found the anaconda environment folder, the next step switch to the anaconda environment folder:
cd /usr/local/anaconda3/envs/pydolphin
then using this command to install package:
./bin/pip install musicbrainzngs
is there any short way to do this? is it possible to install it the PyCharm IDE the simple way? the PyCharm IDE using conda install by default.
First activate your conda environment:
conda activate <env>
This will switch to the version of pip installed in this environment. Then you can install using pip as per normal which will install it into your conda environment:
pip install musicbrainzngs

How to install python 3.7 on miniconda

I'm trying to install python 3.7 env for miniconda on my raspberry pi 4 model B.
But when I'm doing conda install python 3.7
I get Error: No packages found in current Linux-armv7l channels matching: 3.7.
how can I install python 3.7 in some way on that miniconda?
You can try to create new environment with this python version:
conda create -n your_env_name python=3.7
And then you need to activate it:
activate your_env_name
Here you will find more about conda environments.
miniconda only have under python3.4 for armv7l
so you need to use python3.7 for armv7l(no anaconda or miniconda just python)
You might want to try with this command : conda install -c anaconda python=3.7
Tell us if this works

Install python 3.5 via conda get unsatisfiable error "backport.os"

I install anaconda with python version 3.7 on Windows.
Then I want to install TensorFlow, but it don't support python 3.7.
I try to install python 3.5, but get this error:
How to resolve this conflict to install python 3.5?
You can create an environment with the Python version of your choice.
Example create an environment called deep with python 3.5 and tensorflow:
conda create -n deep python=3.5 tensorflow
After that we can activate it with
conda activate deep
While in this environment you will have Python 3.5 and tensorflow. You can add other packages to your environment anywhere. E.g. adding latest scipy, pandas, and jupyter
conda install --name deep scipy pandas jupyter
Updated: While in the environment, you don’t have to specify the environment name, when installing packages. You can do:
conda install package_name
When done doing awesomeness, you can deactivate as so:
conda deactivate
;)
So your workflow when working with Tensorflow, would include activating your ‘deep’ environment and use Python 3.5 there ;) e.g.
conda activate deep
jupyter lab
Assuming you have installed tensorflow and jupyter, this will start a service on your default browser where you can start building your project.
Happy coding ...
Check out conda documentation https://conda.io/docs/user-guide/tasks/manage-pkgs.html
Today Tensorflow doesn't support Python 3.7 . You have to create a new environment with Python 3.4, 3.5 or 3.6. With conda it's easy to handle different environments and versions. In addition it's recommended using pip to install Tensorflow.
Python 3.6 with CPU:
conda create -y -n name_of_env python=3.6 # create new environment
source activate name_of_env # activate the new environment
pip install tensorflow # install tensorflow
Python 3.6 with GPU (please check the additional setup for using a GPU):
conda create -y -n name_of_env python=3.6
source activate name_of_env
pip install tensorflow-gpu
Tip: Finally you can test your installation with the following command:
echo 'import tensorflow as tf; print(tf.__version__)' | python
# 1.12.0

Tensorflow r1.0 : could not a find a version that satisfies the requirement tensorflow

I want to install Tensorflow 1.o for python on windows.
This is information for my system.
D:\>python --version
Python 3.5.2 :: Anaconda 4.2.0 (32-bit)
D:\>pip3 --version
pip 9.0.1 from d:\web\anaconda\lib\site-packages (python 3.5)'
But, when I execute below command,
D:\>pip3 install tensorflow
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
I don't understand what the problem is...
And I tried another way...
This is case when I use Conda
(tensorflow) D:\>pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl
tensorflow-1.0.0-cp35-cp35m-win_x86_64.whl is not a supported wheel on this platform.
What is the problem?
I was in same problem.
Below command solved my problem
pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0-py3-none-any.whl
to find the list of all the urls based on the python version and CPU or GPU only refer to:
https://www.tensorflow.org/install/pip
Tensorflow requires a 64-bit version of Python.
Additionally, it only supports Python 3.5.x through Python 3.8.x.
If you're using a 32-bit version of Python or a version that's too old or new, then you'll get that error message.
To fix it, you can install the 64-bit version of Python 3.8.6 via Python's website.
Tensorflow on windows needs python 3.5. You can follow following steps to activate python 3.5 in anaconda:
See which version of python you have: conda search python
If you already have python 3.5 then go to step 3
otherwise use conda create -n py35 python=3.5 anaconda to create python 3.5
Activate python 3.5 using activate py35
Now install tensorflow using conda install tensorflow
If step4 is not working i.e, something like "tensorflow: no package found " then follow this tutorial to forge conda-forge channel and then try installing tensorflow using step4. It worked for me.
Try this
Installing with Anaconda
conda create --name tensorflow python=3.5
activate tensorflow
conda install jupyter
conda install scipy
pip install tensorflow
or
pip install tensorflow-gpu
It is important to add python=3.5 at the end of the first line, because it will install Python 3.5.
I was getting the same error
Get Python 3.5
Upgrade pip version to 9
Install tensorflow
It worked for me
I did it with:
python3 -m pip install --upgrade tensorflow
From your python version output, looks like that you are using Anaconda python, in that case, there is a simple way to install tensorflow.
conda install -c conda-forge tensorflow
This command will take care of all dependencies like upgrade/downgrade etc.
upgrading pip worked for me
python -m pip install --upgrade pip
i had python 3.8.5 ..but it will not work with tenserflow..
so i installed python 3.7.9 and it worked.
The solution for me was sooo dumb!!
I was using Python 3.8 in my environment. I made a new environment using Python 3.7, and the install worked fine.
source
The TensorFlow package couldn't be found by the latest version of the "pip".
To be honest, I really don't know why this is...
but, the quick fix that worked out for me was:
[In case you are using a virtual environment]
downgrade the virtual environment to python-3.8.x and pip-20.2.x
In case of anaconda, try:
conda install python=3.8
This should install the latest version of python-3.8 and pip-20.2.x for you.
And then, try
pip install tensorflow
Again, this worked fine for me, not sure if it'll work the same for you.
The Reason is that TensorFlow is only available upto python versions <= 3.6. You can't download tensorflow for python versions > 3.6 as there is no tensorflow.
If you don't want to downgrade your entire python version for a single package, do this:
create a new virtual environment for that project (using anaconda)
conda create -n <env_name> python=3.6.8
activate the created environment using conda activate <env_name>
Now install pip install tensorflow
note: If tensorflow dosen't install : try install keras module first and then try installing tensorflow

Installing a package in Conda environment, but only works in Python not iPython?

I am using an Ubuntu docker image. I've installed Anaconda on it with no issues. I'm not trying to install tensorflow, using the directions on the tensorflow website:
conda create --name tensorflow python=3.5
source activate tensorflow
<tensorflow> conda install -c conda-forge tensorflow
It installs with no errors. However, when I import in iPython, it tells me there is no module tensorflow. But if I import when in Python, it works fine.
What's going on and how do I fix it?
You have to install IPython in the conda environment
source activate tensorflow
conda install ipython
I went through the same thing. We are installing tensorflow in different conda environment. So It may not consist of all the packages. I needed to install jupyter notebook separately in order to work.

Categories