If I want to run Python inside ATOM, I have to always disable PlatformIO and restart ATOM again, so it works fine. I managed to avoid that pain by pointing my installed Python packages to run Python 3, instead of the standard Python (Python 2), But I really wish I could understand what's happening so I could use any of the versions freely, as I need. Any light on the subject?
My system Is Linux(mint 19)
Thanks!!!
It sounds like your default Python is 2.7, but everything is installed against Python 3, and Atom always uses Python 2. You can fix this by changing the default Python that is used by Atom.
For one off uses, try How to configure Atom to run Python3 scripts? and for permanently changing the version of Python for Atom, have a look at How to setup Atom's script to run Python 3.x scripts? May the combination with Windows 7 Pro x64 be the issue? (despite Windows 7 Pro in the title, the solution applies to Atom in general).
Related
I believe from this post that this is not an uncommon issue with tkinter and new downloads of Python 2.7 (after re-downloading from 2016 on). I am using the Anaconda 2.7 for win64 on a Windows 7 machine. The filepaths seem almost identical to what is described here, except for "Anaconda2" instead of "Python27"; the "tcl" folder is in it's own directory in C:/Users/user:2312900/tcl and not in the "lib" directory.
Is there any way to fix this for Anaconda? That I tried what was described in the post, but it didn't work for me.
Is there any way to manually install a 64bit python 2.7 compatible wheel for tkinter? Does anyone know of any other packages to make simple GUI's with Python if this is an irreconcilable issue with the Annaconda distribution. I have a lot of other packages that were painfully installed that I do not want to use something else.
I am using Anaconda2 64bit and tkinter does indeed work, as I use it frequently. It might be something simple: can you import the package into your program? Try import Tkinter instead, i.e. with a capital 'T'.
Do you have user on your Windows called "user:2312900"? Python (and some other programs) don't like paths with special characters like colon ":". Try to install all your needed programs (Python, Tkinter, etc) in the path without special characters and without spaces " ".
For example: c:\ProgramData\Anaconda3\ or c:\Python27\
I am using python 2.7.10 with Anaconda 2.3.0, and I use the Anaconda IDE with sublime text 3 (is it a different Anaconda??).
However, for a course I'm taking we're required to use python 3.5.
I would like to keep python 2.7 on my computer, though. What would be the easiest way to have both versions coexist and be easily accessible through the terminal (through sublime would be great, but I'd be happy with managing it on the terminal for now)?
Also, I typically run conda update conda, and conda update anaconda on a regular basis to keep everything up to date. How would that work with different versions of python installed?
This sort of thing is actually what Anaconda is built for. Although the default Python version depends on the installer you used, Anaconda supports both versions. The easiest way is to create a new virtual environment. From the following link, use this conda command to build a Python 3 environment:
conda create -n py35 python=3.5 anaconda
That is if you need Python 3.5 with all the anaconda packages. You can either leave that blank if you just want a vanilla version of Python 3.5, or specify individual packages.
Once you do this, Python 3.5 will be available with the console command py35. You should definitely read the following link about how to manage environments. Really, you should read that whole tutorial.
I hope this is the right place to look for help. If not so forgive me since I am new to this but I want to start learning python for usage with the RaspberryPI. I read that it makes more sense to start with python3 rather than python2. So I installed Anaconda3 on mac os x and want to use the atom editor with the hydrogen package to start my adventure.
I understand the requirement that I need python2.x to run hydrogen, but I want to use python3.x for learning programming. I thought I might get around this issue by creating an environment with anaconda using python2.x,
conda create --name python2 python=2
and then switch to it by
source activate python2
however, while this creates and switches to the desired environment, atom and hydrogen still seem to try use python3 when I start atom in the environment python2 from the terminal. Does anyone here know how to correctly set up what I described above?
Thanks a lot in advance!
Check the output of jupyter kernelspec list when your python2 environment is activated; if that doesn't list the Python 2 Jupyter kernel (possibly because the python2 environment doesn't contain Jupyter but the root Python 3 environment does), atom will not be able to find it (in which case you can manually configure the Kernel Spec setting in atom to specify where the kernel is located).
I have just installed Ubuntu 12.04 which comes with Python 2.7. I have installed Python 3.3, so now I have both versions. For example, if I type python in the terminal I get version 2.7 and if I type python3.3 I get that version.
I don't see why I would need 2 versions (?) so how do I uninstall Python 2.7? And if I do so, will the "python" command then point to Python 3.3?
VERY IMPORTANT EDIT
Removing an older version of python may be very dangerous and can cause trouble in your whole system! For your case instead of removing the older python you can simply use an alias in your terminal, so that when you type python it opens python3.3;
Here is the procedure, add this line:
alias python=python3
Into~/.bash_aliases or: ~/.bashrc
Btw I guess If you ask this question in AskUbuntu you may have a quicker/better response!
You should never remove the builtin Python in your Ubuntu distribution. Bad things will happen if you do.
It is highly recommended to use virtualenv to install other Python environments.
Here's a good Stackoverflow question that demonstrates how:
Is it possible to install another version of Python to Virtualenv?
So I've been working with python 2.7 no problem for a while now. I've been using pip for a couple of months without issue. I recently installed virtualenv and now none of my pythons or pip can find vcvarsall.bat, even though this wasn't a problem before. I thought virtualenv seemed like a good idea, but not if it breaks everything around it. I tried to run repair on VS C++ but it didn't find any problems. Has anyone run into something like this before?
Seems that the problem is that Python 2.7 64 bit has a compilation problem. It would seem that I need to download a special package from MS to get access to 64-bit c/c++ compiler that's compatible with Python 2.7. Not a problem, except that's its 3 gigabytes. So, I just did it on my Linux VM and Windows Python 2.7 is 32-bit for me now. Not the best solution, but we're supposedly going to upgrade to Python 3 one of these years. Probably about when Python 4 comes out and the Python 3 compiler is obsolete too. C'est le vie!