Downgrading python within a conda enviorment - python

Hello I am trying to downgrade my python version within a conda environment. I was originally running 3.6 but I package I wanted required version 3.7. So I ran conda install python=3.7 adn built then installed apex, the package I needed. however I now needed to return to python 3.6 so that I could install numpy 1.13.3. I ran conda install --no-depspython=3.6 This gives me the a whole lot of package conflict errors .I then tried uninstalling python (to later reinstall) but this produces this error RemoveError: This operation will remove conda without replacing it with another version of conda.. So is there any possible way to downgrade my python version?

Related

How do I change a python package version in just a specific environment?

I initially have pandas==1.5 both in my base environment, and in a specific environment
For a project's purpose, I had to downgrade my pandas version in my project environment to version 1.4. However, when I downgraded the pandas version in that environment, the version in my base environment got downgraded as well.
Why is this so, and how can I keep my package version downgrade to just a specific environment?
Can you try to installing your packages through Conda rather than pip since you're activating your environment through Conda itself.
conda install pandas=1.4.4
Remove the existing package and keep the latest one as you had earlier in both base and inside your environment. Then try to downgrade through conda.
You could read up more here, on using pip inside conda environment.
pip install 'package-name'==2.1.0
You can use above command

How can I update sentencepiece package to its latest version using conda?

I have installed conda on linux ubuntu 16. When I install or update a package named sentencepiece it install the version 0.1.85 (which I guess is from 2 months ago according to anaconda website). However the latest version is 0.1.91.
I can't install the latest version so that I can use it in python because I guess it refers to the conda packages. I tried to follow an instruction in the package home on github and installed the latest version using a package manager named vcpkg. However, I don't think it has any effect on python or conda, as a sample program didn't compile and the conda still list it as 0.1.85
please guide me what can I do
Use pip instead of conda
First step - conda activate <your_env>
Next step - pip install sentencepiece
Then last step - check the version using pip freeze | grep "sentence*"
Output should be sentencepiece==0.1.91

How to install TensorFlow with Python 3.8

Whenever I try to install TensorFlow with pip on Python 3.8, I get the error that TensorFlow is not found. I have realized later on that it is not supported by Python 3.8.
How can I install TensorFlow on Python 3.8?
As of May 7, 2020, according to Tensorflow's Installation page with pip, Python 3.8 is now supported. Python 3.8 support requires TensorFlow 2.2 or later.
You should be able to install it normally via pip.
Prior to May 2020:
As you mentioned, it is currently not supported by Python 3.8, but is by Python 3.7.
You want to have virtualenv installed. You also need Python 3.7.
Then you can just start a virtualenv with -p python3.7 and install it using pip like you did before:
virtualenv --system-site-packages -p python3.7 DEST_DIR
source ./DEST_DIR/bin/activate
pip install --upgrade pip
pip install --upgrade tensorflow
Tensorflow does not support Python 3.8 at the moment. The latest supported Python version is 3.7. A solution is to install Python 3.7, this will not affect your codes since Python 3.7 and 3.8 are very similar. Right now Python 3.7 is supported by more frameworks like TensorFlow. Soon Python 3.8 will have more supported frameworks, and that´s when you can install TensorFlow for Python 3.8.
Currently it does support python 3.8 all we need to do is create a new environment ,select 'update index' , select uninstalled and one can find tensorflow for installing
An option is to install it for Python 3.7 which is supported for Tensorflow 2.0. If you have anaconda navigator, you can create an environment with Python 3.7 specifically for installing tensorflow. Open your terminal in this environment and then type:
conda install tensorflow
Afterwards, you could install every other package you need and that's it.
Instead of pip or conda command, I used pip3 command and it worked.
I tried this in Anaconda and faced problems when installing Tensorflow 1.14.0.
Steps to Resolve
Create a new environment
Check the python version
conda search python
I found version 3.8.0. Tensorflow 1.14 is not supported with this version.
Next step is to downgrade python in new environment to 3.7.0
conda install python=3.7.0
Once this is done, install TensorFlow 1.14.

Python package thinks I have older version of dependency than I do

I'm trying to use the h2o package. I'm running macOS Mojave with Anaconda installed.
I've done a pip install h2o and it was successful. It installed at location /anaconda/lib/python3.6/site-packages.
I try to import it and get this error message: "H2O requires colorama module of version 0.3.8 or newer. You have version 0.3.7."
But when I do pip show colorama it says I have version 0.4.1, so the error message doesn't make sense. It's installed at the same location as h2o at /anaconda/lib/python3.6/site-packages
Any thoughts?
If you are using Anaconda, I would recommend creating a new conda environment and then conda installing all the packages you need (for H2O you would use conda install -c h2oai h2o=3.22.1.2 ). This will help prevent package conflicts or having trouble pointing to the correct version.
you should also run conda list to see whether you have another version of colorma installed. Alternatively, you could do a pip uninstall colorama and see whether H2O still picks up a 0.3.7 version - at the very least it will help reveal whether you have multiple versions.

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

Categories