I'm trying to install python and tensorflow to learn as part of a class I am taking, and am having some issues installing tensorflow. I keep getting the same set of errors:
C:\Users\X\AppData\Local\Programs\Python\Python36-32\python.exe: can't find '__main__' module in 'C:\\'
or
Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
I've tried uninstalling and reinstalling python while adding it to my path, and that solved me not being stuck with syntax errors (most of the time), but I haven't been able to make any progress. Any advice on moving forward would be appreciated.
To be clear, I am typing the following command into my command prompt:
pip3 install --upgrade tensorflow
As per the instructions on the TensorFlow website - I've been finding the "C:\>" raises a syntax error however.
your pip3 is broken, because I can clearly see tensorflow distribution on PyPi for python 3.6 https://pypi.python.org/pypi/tensorflow/1.5.0. Also, I just created a new virtual env for python 3.6 and I am able to pip install it.
Also you can download manually the "tensorflow-1.5.0-cp36-cp36m-win_amd64.whl",assuming you have windows, and pip install tensorflow-1.5.0-cp36-cp36m-win_amd64.whl
Related
I'm stuck on an issue that I can't seem to solve. I was fine using PyCaret on my other PC and had recently got a new desktop.
I was working on one dataset on my old PC and had no problems with setup() and PyCaret preprocessed my data without any issues. When I worked on my the same dataset with my new desktop and Jupyter newly installed, I noticed I ran into an ValueError: Setting a random_state has no effect since shuffle is False. You should leave random_state to its default (None), or set shuffle=True. I thought it was strange but went on to set fold_shuffle=True to get through this.
Next, I encountered AttributeError: 'Simple_Imputer' object has no attribute 'fill_value_categorical'. It seems I'm getting failures at every step of setup(). I went through the forums and found a thread where at the bottom of it, #eddygeek mentioned that PyCaret was set up to fail if the sklearn version is wrong. This got me looking into the packages I have that may meet dependencies between packages.
I noticed the following issues:
I get several errors:
ERROR: Command errored out with exit status 1: C:\Users\%%USER%%\anaconda3\python.exe'
Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment
ERROR: Could not find a version that satisfies the requirement scikit-learn==0.23.2
Screenshot of more errors attached
Jupyter Notebook fails to launch because of Pandas Profiling Import Error: cannot import name 'soft_unicode' from 'markupsafe'. I got around this by installing markupsafe===2.0.1 but this leads to incompatibility warning by pandas-profiling 3.2.0 saying it needs markupsafe 2.1.1
PyCaret keeps getting installed as 2.2.2 version. I think that's why it keeps looking for scikit-learn 0.23.2 when the latest PyCaret 2.3.10 works with scikit-learn >=1.0. I've tried uninstalling and reinstalling PyCaret several times but it's still the same.
What I've done
I'm on Python 3.9.12 that was installed together with Anaconda3. My PyCaret was installed with pip install pycaret[full] --user on Anaconda Prompt.
In my pip list, I have:
scikit-learn 1.1.2
markupsafe 2.1.1
pandas-profiling 3.2.0
pycaret 2.2.2
I've added C:\Users\%%USER%%\AppData\Roaming\Python\Python39\Scripts to PATH
I'm really at my wits end so I hope I can get some advice on this. Thank you.
I've encountered the very same issues and solved as follows.
According to the documentation, there are a few problems with your setup:
PyCaret is not yet compatible with sklearn>=0.23.2
PyCaret is tested and supported on the following 64-bit systems:
Python 3.6 – 3.8
Python 3.9 for Ubuntu only
So if you're using python 3.9 on Windows, I'd start with that.
I went into a rabbit hole of downgrading the packages and getting one error after another.
Long story short, the setup that finally worked was:
sklearn 0.23.1
scipy 1.5.2
Both installed on a virtual conda environment but at the end I had to run:
pip3 install pycaret[full]
Notice pip3 intead of pip because I was getting permission errors.
You are using a very old version of pycaret which does not work in Python 3.9. Please install the latest version in a fresh (conda) environment. Make sure it is a new environment in order to avoid any package issues.
# This installs the pre-release 3.0.0 release which has reduced dependencies.
pip install --pre pycaret
I am trying to call a simple keras.Sequential() model in python 3.9 (64bit), however when trying to install tensorflow using pip I get the following error:
ERROR: Could not find a version that satisfies the requirement tensorflow
ERROR: No matching distribution found for tensorflow
Having stacked this error I followed this fix: TensorFlow not found using pip and tried to use the latest version of CPU only windows wheel using the following command:
install python -m pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.4.0-cp38-cp38-win_amd64.whl
However I then get the following error:
ERROR: tensorflow_cpu-2.4.0-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
The only answer on this that I can find is this:
Tensorflow installation error: not a supported wheel on this platform
However the answer relates to python2.7 and does not apply to this situation.
Is anyone able to help understand why I am finding it so difficult to install tensorflow.
Thanks.
It appears that TensorFlow only supports Python 3.5-3.8, so you are unable to install it because your version of Python is 3.9.
You will need to use a different version of Python if you want to install TensorFlow.
System used:
MacOS Big Sur MacBook Air M1 processor -
Python 3.8.2 -
pip 20.3.3
I am trying to install Tensorflow 2 on my Mac, I have all the requirements needed, I tried
python -m pip install tensorflow but I receive these two errors:
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution
found for tensorflow
I also tried to download from https://pypi.org/project/tensorflow/2.4.0/#files the last release for mac and python 3.8 and running python -m pip install /Users/v.b./Downloads/tensorflow-2.4.0-cp38-cp38-macosx_10_11_x86_64.whl
I receive this error:
ERROR: tensorflow-2.4.0-cp38-cp38-macosx_10_11_x86_64.whl is not a
supported wheel on this platform.
I think it is something really stupid I am missing but I don't know what it is. I googled a lot and some other people found a solution to similar problems but not exactly to mine. Does anyone have any clue or had the same issue ?
Check this one: https://github.com/apple/tensorflow_macos
Once downloaded you may use install_venv.sh to install tf with virtual environment.
Or install it to your current setup by running the command below:
python3 -m pip install --upgrade ~/Downloads/tensorflow_macos/x86_64/*.whl --no-dependencies --force
After following all the recommended tensorflow install guides, by the time I tried "pip install --upgrade tensorflow" it kept saying "No matching distribution found" and "Could not find a version that satisfies the requirement tensorflow (from versions:none)", why does this happen?? Also I'm using Python 3.7!!
It has been reported some issues with Python 3.7 and TensorFlow. Maybe installing a specific version could work for you. For example:
pip install tensorflow==1.15.0
I've installed tensorflow over pip3 and python3, and am working on it. While using the colum function, the commonly experienced error AttributeError: module 'tensorflow' has no attribute 'feature_column'.
It might look like a duplicate question, but I've looked at the other occurrences of the same question, but, after updating the file (pip3 install --upgrade tensorflow), I checked the version. The version 0.12.0 is shown. So why does pip still show its completely new. Is 0.12.0 the newest version?
When I attempted to uninstall tensorflow and re-install it, it refuses to re-install. I'm using python3 -m pip install tensorflow. The error thrown here is Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
Thanks in advance for your help
As mentioned in the comments, the most probable solution to the attribute error is the update problem. However, if you're encountering the Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow, the easiest solution is to use following code.
pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.1.0-py2-none-any.whl (for python 2)
or
pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.1.0-py3-none-any.whl (for python 3)