I had a working deep learning library on CPU Linux Mint ubuntu verion 18.3 with Anaconda 3.6 but something got hosed when I was tinkering around in Theano.
https://machinelearningmastery.com/setup-python-environment-machine-learning-deep-learning-anaconda/
Everything was working just fine until I wanted to tinker around with a few .py files with KERAS_BACKEND=theano python program.py and in an attempt to fix something not working in Theano, I did this command from the theano website
http://deeplearning.net/software/theano_versions/dev/requirements.html
conda install numpy scipy mkl <nose> <sphinx> <pydot-ng>
Not knowing what I am doing it almost seemed to pooch everything... And install Python 2.7 dependencies. Would anyone be able to give me a tip on how reset my deep learning library in anaconda 3.6 build???
If I do a conda list anaconda$ its a custom build 2.7 which was not intentional! Time to start learning how to do virtual sessions :)
Read the docs for uninstalling Anaconda
https://docs.anaconda.com/anaconda/install/uninstall
Do a conda install anaconda-clean
Then a anaconda-clean --yes
Then re-download the Anaconda 5.2 For Linux Installer and run thru
the steps. https://www.anaconda.com/download/#linux
I had a similar problem and just did:
conda install --revision 0
this gives me a fresh Anaconda installation, with the drawback of needing to install every package again. Hovewer, all environments created remain intact.
More on Anaconda revisions here: https://medium.com/#wilpat456/fix-broken-anaconda-environment-due-to-recent-package-download-9094fb0f3a04
Related
I have tried install pytorch with pip but there is no package fit for my environment. I use Python 3.11.2. Then I downloaded anaconda and installed pytorch successfully. However, when I imported torch in python, it said there is no such module.
I followed many tutorials by restart my laptop, created conda enviroment and install pytorch there. Nothing worked.
Anyone having similar problems?
That's not clear for your problem. I think you may show the process of how you installed pytorch by conda.
You can use conda list pip list to show your package installed.
The problem in anaconda may be you install pytorch in your specific env, but when you open your ide (i.e. vscode, pycharm) you choose the base env. You may try run your code in your terminal by conda activate xxxx then python3 then import torch.
I've noticed that upon running my tensorflow, I have a spike on first few runs on start-up
upon searching on the internet, I came into this blog
the replies and official documents got me even more confusing on which installation is best for performance.
Is it
Conda
pip
docker
some others that are not listed?
My current setup is windows 10 laptop with GTX965M, tensorflow installation accordingly to this guide
Another weird thing, my conda installation is only able to install tensorflow 1.8 for some reason. Upon running the code conda update tensorflow, it returns latest version has been installed. But I can install tensorflow 2 by stating conda install tensorflow=2. Is this normal? If not what could be the issue? (I have all the packages updated before 'updating/installing' tensorflow. Doesn't help.)
As per my knowledge creating a virtual environment in anaconda and install the Tensorflow in virtual environment has advantages.
Please refer to this SO Answer for the advantages and steps to create virtual environment.
Upon running the code conda update tensorflow, it returns latest
version has been installed. But I can install tensorflow 2 by stating
conda install tensorflow=2. Is this normal?
Yes, this is a normal behavior.
Google Colab is an easy way to learn and use TensorFlow. It's a Jupyter notebook environment that requires no setup to use and runs entirely in the cloud.
ERROR: Shapely-1.6.4.post2-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
I cannot install Shapely with:
pip install "C:/path.../Shapely-1.6.4.post2-cp36-cp36m-win_amd64.whl
This is what I have tried so far:
* pip install --upgrade pip
* Python version 3.6.4, Windows 64 bit
Should I be installing another version? cp36 and win_amd64 looks correct. Unless amd means the CPU? In that case I have Intel i5. I don't see that version so I don't think that's it...
Any other suggestions on what I am doing wrong?
EDIT: Downloaded wheel from here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely
There's a helpful complete guide here to do so. Windows have many problems with python wheel files. If you want my advice, you better don't use Windows for python programming, Linux is perfect for such a thing. You can use Ubuntu which is great and stable.
If you really want to program python in Windows, I suggest you to install and use Anaconda. It's a great tool and helps you with installing python packages and programming in python.
EDIT: I tried the Anaconda way and it works fine. After installing Anaconda I opened Anaconda Powershell Prompt as admin (cause there was permission problem for me in installing Shapely!) and then ran the command conda install shapely. Once installation completed, I ran the command jupyter notebook and in jupyter I was able to use Shapely.
I installed the Shapely in the base environment of conda which is not good. If you want use Anaconda, you better learn how to manage environments in conda.
What I did to try and solve this issue:
Using Mac OS X
Using Anaconda distro currently in my computer as the path /Users/hongshuhong/anaconda/
Used conda instead of virtualenv because of my distribution of python. I referred to the guide here and tried to download the same with conda's package manager: https://www.tensorflow.org/versions/master/get_started/os_setup.html#download-and-setup
Tensorflow worked correctly when I created an anaconda env using the command conda create --name ML python=2.7 anaconda to state I'm using 2.7 python, then used this command conda install -c https://conda.anaconda.org/jjhelmus tensorflow
gathered from the Anaconda Cloud to attempt to download it. It worked when I said
$ python
>>> import tensorflow as tf
...
However, it doesn't really fix the issue:
However, I want to use the 3.5 distribution of python, simply to keep up with the times and not use outdated pythons.
I attempted to download it using the same way in python=3.5, but it raised this error when I tried to run the command conda install -c https://conda.anaconda.org/jjhelmus tensorflow :
Hint: the following packages conflict with each other:
- tensorflow
- python 3.5*
Use 'conda info tensorflow' etc. to see the dependencies for each package.
And I ran the conda info tensorflow to see what was going on and I got:
Fetching package metadata: ....
Error: No packages found in current osx-64 channels matching: tensorflow
This is really frustrating me and I'm not sure what to do. If there's no work around for this, I think I'll have to use Anaconda's python 2.7 distribution for TensorFlow experiments. If anyone has any idea how to solve this compatibility issue(or some other kind of issue), I'd be extremely grateful. Thanks.
EDIT: I'm pretty sure TensorFlow supports 3.5 because in their documentations they say they support 2.7 python and 3.3+. If there were no clues as to whether they support 3.5, I would have already given up and used 2.7 by now.
The version of TensorFlow packaged here is version 0.5.
Python 3.x support was introduced in TensorFlow 0.6, so you need to figure out how to install the newest version into Anaconda.
Usually you can install packages into anaconda using pip, but I haven't succeeded with TensorFlow.
EDIT: I just noticed that the documentation hasn't updated the url to the pip-wheel.
To install tensorflow in python 3.5 via pip, use the following command:
$ sudo easy_install --upgrade six
$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.6.0-py3-none-any.whl
This links to ...tensorflow-0.5.0-py2-none-any.whl, which is an older version of tensorflow for python 2.x.
Tensorflow get started page link.
On my desktop PC I have anaconda installed, and on my laptop - to save space - I thought i'd install miniconda and be selective about the modules I install. So I installed a handful, numpy, scipy etc. I didn't install anything which isn't part of the default anaconda install, but I just realized my miniconda install is taking up more space than the anaconda install! (1.8GB vs 2.2GB). (no environments in either)
The bulk of the difference comes from the pkgs folder. The miniconda install seems to have the tar.bz2 of all of the installed packages as well as the exploded versions. Are these safe to delete? Will they be deleted automatically after a while? Is there an option to not cache these?
P.S. I'm developing on both windows and mac (i've tried installed anaconda and miniconda on both mac and windows to see, and I get very similar results).
You can safely delete the tar.bz2 files. They are only used as a cache. The command conda clean -t will clean them automatically.