I tried to install GraphLab, but the result became like this:
AttributeError: module 'graphlab' has no attribute 'connect'
My python version is 3.6.1. And I also tried the code:
python -m pip install connect
But it didn't work.
Does anyone know how to solve this problems? Thanks!
This happens when Version in python on system is different from Anaconda. Anaconda Python is mixing in imports from the regular Python on the system. Make sure "which python" points to the right Python (whereever you installed Anaconda Python. And similarly "which pip" Otherwise you will want to run python (or pip) from [where ever you installed Anaconda]/bin/python. You can try the Dato Launcher which tries to set it all up for you.
Also, if you are not using Anaconda, on Graphlab support of installation, they recommended only two option for installation, one on Anaconda and the other on Virtualenv. I personally recommend you to use Anaconda for Graphlab as most of the development support and learning is totally based on Anaconda usage. You may follow this link to install Graphlab and Anaconda Here. I hope this helps.
Note: In installation of Anaconda, Python Version can be different like Python 2.7, but after installation of Anaconda, you can update to latest version of your choice.
Related
I have used python 3.8.13 as installed by Homebrew for years, mostly with jupyter-lab for coding in notebooks. Recently I ran brew to install a package and it looks like it installed python 3.10: brew list shows both python#3.8 and python#3.10 and running python3 from the command line gives me a 3.10 session, with no knowledge of my site-packages...
I either want to:
remove python 3.10 and continue using 3.8 as I was. python#3.8 would then be the python3 command as it was before.
or
change over to using python 3.10 and have all the site-packages installed when using 3.8 "come with". In particular, jupyter-lab needs to know about them in the 3.10 environment so my notebooks keep working.
Could someone help me with either of these? I'm not familiar enough with brew or python to clearly see how to do either to completion. Thanks so much.
I have already used pip install pysimplegui, using pip list shows that it is installed in Terminal (I use a mac). I also made sure it was the most recent version of pysimplegui.
I'm newer to coding some I'm not sure what other information to put here. Any advice would be enormously helpful. I am using Jupyter Notebook through Anaconda.
I should add that before this I tried doing the same thing with easygui and had the exact same error.
In the anaconda terminal use python -m pip install PySimpleGUI so you install it in the python being used.
Mixing pip install and conda install is not to recommend, although sometimes unavoidable. What has happened in your case is not related to this conflict, though. In this case, the wrong pip was invoked when installing the package, so it was installed for a different python interpreter than the one you're using to run the notebook. You can have several python versions installed globally, both python(2) and python3. Furthermore, you may have even more versions of python in virtual environments, so you need to pay attention to which version you want to install a package for.
In case you don't have any specific reason not to, you'll save yourself some future headaches by using the conda package management system over pip to avoid those situations where they don't play nice with each other and you end up with a broken or unpredictable package setup.
Note that I'm not saying conda is better than pip in any way, I'm only proposing going with conda since you're using the Anaconda environment and its preinstalled packages already.
copy from PySimpleGUI
https://pysimplegui.readthedocs.io/en/latest/
Warning - tkinter + Python 3.7.3 and later, including 3.8 has problems
The version of tkinter that is being supplied with the 3.7.3 and later versions of Python is known to have a problem with table colors. Basically, they don't work. As a result, if you want to use the plain PySimpleGUI running on tkinter, you should be using 3.7.2 or less. 3.6 is the version PySimpleGUI has chosen as the recommended version for most users.
How to install Python 3.6.6 on Mac? Can anyone tell me the Commit Identifier for Python 3.6.6? I can't find the link to download
You can find the latest release here -> https://www.python.org/downloads/
I suggest you use Python version 3.6.5 and install it using Anaconda. Go to this site and download Python 3.6. This will load python and many of the packages you may need to use to program in python. You also get the anaconda-navigator which is a nice package manager. Anaconda also makes it simple to use virtual environments. The anaconda documentation will walk you thru that as well as how to use the conda command. It's very good package for those who are new to python on a Mac.
I am trying to set and install some packages with python. I have already installed python3 along with Anaconda.
My first question is that when I type:
$ python3
Anaconda says: "$" is not an internal or external command. Should I be using a different command or how can I fix this?
My second question is this: I am trying to install the packages from these four sites based on a book I got:
NumPy: http://docs.scipy.org/doc/numpy-1.10.1/user/install.html
SciPy: http://www.scipy.org/install.html
scikit-learn: http://scikit-learn.org/stable/install.html
matplotlib: http://matplotlib.org/1.4.2/users/installing.html
This note was in there as well: "If you are on Windows, you should have installed a SciPy-stack compatible version of Python 3".
When I go to copy the line for installing the packages on windows and pasting it into my terminal, it gives the error: "The system can not find the file specified"
How can I fix this?
Don't type the $, just python3.
The packages you mention are already included in Anaconda python distribution.
$ is usually used to indicate the start of a line that should be executed in a terminal window. So, therefore, remove the $ and write everything that comes afterwards.
If you installed Anaconda, then you should have the conda command available to you. Besides scikit-learn, the packages should already be installed with your Anaconda distribution. What you could do is $ conda install scikit-learn and this should install scikit-learn for you.
I recommend you to look at the documentation of Anaconda at the Anaconda website (https://docs.anaconda.com/anaconda/) to learn more on how Anaconda, packages and Python works.
Just as emmv said, a few other things in my mind:
You installed Python with Anaconda. I assume you did not add Python to PATH. You should check Anaconda website for any further installments, downloads etc.
Anaconda uses a simple "conda" command, after all. Really, just look at Anaconda's website if you are confused.
I have Ubuntu 14.04 LTS. I guess different versions of python are pre-installed in Ubuntu 14.04. Right now when I type 'python' in terminal it opens python 2.7.11, but I guess the default version of Ubuntu 14.04 is 2.7.6. When I type /usr/bin/python it opens the default version. I know this can be done with making aliases. The real problem is, I have installed pygame, cv2 (that is for image processing) using apt-get. These are installed for default version of python i.e python 2.7.6. Also I have installed anaconda with python 2.7.11 using pip, but again 'pip' and anaconda are installed for 2.7.11. I know python 3 is also pre-installed there but I don't use it. Also I have no python version installed in user/local/bin.Now I want to know why this problem is occurring? How can I fix this now? Also how to import all the libraries for one python version(either default or another) and how to use it? How to configure my settings so that I would not have any problem in future?
If you have easy_install installed you can run
sudo easy_install pip
to install pip. As far as installing Anaconda goes, try using this stack overflow question's answer. If you can't get that to work comment explaining the issue.
First of all I want to thanks Bennet for responding to my question so that I was able to figure out what the problem was. Actually the problem was with aliasing. When I installed cv2 or pygame using apt-get, they were installed for default version but when I installed any package by downloading the installer first (like I installed anaconda), it was installed for python 2.7.11 because 'python' was aliased for this version(that is 2.7.11). So, basically make sure that the default version for which you want to install everything is the one which is aliased as 'python', and everything goes fine. I aliased 'python' for the default version and then installed anaconda via installer and now it has been installed default version.