I've been going with a basic Python3.4 install that I've been installing many modules into for over the past month but have reached a point where pip is coming up short and I'm going to just install the full Anaconda on my system to go deeper into bokeh-server stuff.
I get a popup during the Windows 64bit installer (Anaconda3-2.3.0-Windows-x86_64.exe) saying
A version of Python 3.4 (64-bit) is already at C:\Python34\ We
recommend that if you want Anaconda registered as your system Python,
you unregister this Python first. If you really know this is what you
want, click OK, otherwise click cancel to continue.
Didn't find much documentation on this subject, and I'm not really sure how to "unregister" that installation of Python apart from uninstalling it entirely from Windows which I imagine would accomplish such a thing. Is this basically telling me to check how my Python Launcher for Windows is setup after the Anaconda installation? I'm completely unfamiliar with this notion of python system registration? Is that just a round about warning about which python version takes precedence on the system path, or which installation holds the file associations?
The solution is simply to uninstall python (for example, run the original python installer and select the uninstall option). The python key in the windows registry will be removed (which is what unregister means in this context).
Here is a link to a script that will unregister a Python installation (if you haven't come across it already). I personally have not dealt with anything like this. It seems like it should work, but you may have to tinker around with some of the paths in the script to get things to work. The links in #nightuser 's post will also probably fix the issue.
Why not just remove your version of Python? You could do a pip freeze > requirements.txt with your current Python and add them to Anaconda, or create an environment with Anaconda using those packages. Anaconda has greatly decreased the amount of time I spend setting things up.
You are getting that prompt because you have another version already installed the safe way to do this is going to the directory of the existing version and running the uninstaller. Once the previous version is completely uninstalled. You can run the installation as normal it should works!
enter image description hereYou have already installed python in your environment, so your system can handle your python code. Anaconda can handle your python code as well. If you install Anaconda and expect use python provided by Anaconda, then your system will confuse about assigning the code job. To avoid this confusion, there is always a path to point out which python you want.
You can ask your OS to find specific python by changing your environment path in windows OS:
By deleting the python path your Python will be invisible. Changing path is more convenient compared with the uninstall.
If you got a python compiling software like Pycharm, things are different. Pycharm may have python3.6 while your system got python 3.5. You need to delete path in those software or uninstall python specified by those software.
Pycharm
Actually, instead of registering the Anaconda as the system python, you can install it first, then specify your Pycharm and system path to the Anaconda python path. Thus, your Pycharm will use python provided by Anaconda and package & virtual environment you need.
I edit this for lots of times because I got Great wall, so I can't close something pop up in my screen(cause it is Blank). And everything is missing if I refresh. This is annoying.
My system path Anaconda3's python36
Add path in Pycharm
Or you can't use these packages and Anacon's virtual Environment
Related
I've deinstalled and reinstalled a bunch of Python Versions and edited my system variables in order to clean up the quagmire of pip not being able to install packages to the right locations. Long story short: Sublime now can't find numpy (or any 3rd party module), because it somehow figured that the python 2.3 version that comes with ChemDraw is the one I really want to use, not the 3.9 version I had used previously.
I've tried a bunch of tutorials online (such as resetting everything to factory settings) however nothing seems to unlink the python build system from that python 2.3 version that came with ChemDraw. Even deinstalling everything and installing Sublime 4 keeps that association. Like...how?
So here's my problem: My build system for python is linked to the wrong python version and I don't know how to link it to the python 3.9 that's located in AppData/Programs.
How can I associate the python.exe of python 3.9 in AppData with my python Build System instead of the current python 2.3, which is located ProgramFiles?
Ok, so the problem was that there was a system variable called PYTHONPATH, which I don't remember setting. It seems that Chemdraw, if installed with ChemScript, installs it's own python installation, which is 2.X.
That python install seems to set its own system variable called PYTHONPATH, which Sublime seems to prioritize for it's default python build system.
Delete whatever incorrect path is set in PYTHONPATH and paste the following into it instead:
C:...\Python\Python39\Scripts;C:...\Python\Python39;C:...\Python\Launcher;
I'm a python noob working through this intro to python: https://www.youtube.com/watch?v=rfscVS0vtbw. (definitely no need to watch this. Just adding it as context)
It's been going really well, except now I'm up to the part where I need to use pip, and despite having downloaded version 3.8 of Python, it keeps telling me that it doesn't even have pip installed.
I'm wondering if anyone could walk me through what the issue might be and how to actually start using pip in PyCharm.
I've tried downloading pip and installing it but even that doesn't seem to work. If anyone has an ultra-hand-holdy solution (very much for a noob) that would be appreciated.
I feel like the problem might be that I'm putting things in the wrong directories or something? Obviously there are some built-in versions on Python (2.x) already on the Mac so maybe they are interfering?
Thanks in advance for your help.
If I recall correctly, the version of Python that is used when you use the command python is the 2.x version, which doesn't have pip. So if you want to use python in terminal, you should call it as python3 and pip3 for using the pip command.
If you want to set a different Python version as the default one, you can do that. Here is a tutorial that can get you started with that (there's a plethora of other tutorials if this one isn't clear enough): https://opensource.com/article/19/5/python-3-default-mac
For using PyCharm specifically, you can setup the Python interpreter that is used with PyCharm by going to Preferences(or Settings) -> Project:[name of your project] -> Project Interpreter and then chose the desired Python Interpreter from the drop down menu. You can also create a virtual environment there by clicking on the cog icon and choosing Add. This is the preferred way and very convenient to keep installed packages local to your project. After you're done with that, open up PyCharms terminal (at the bottom of your PyCharm window) and you should be able to normally use pip with the command pip.
Alternatively, you can install Python packages in PyCharm using their built in package manager that you can find in the same window where you set your Python Interpreter. Below the dropdown menu you'll see a + sign, where you can click to add packages.
In this SO post I outlined my problems, and I would like to try and solve them by getting rid of all my downloaded python launchers, modules, versions, pip etc (for python 2 & 3) and start afresh. My only problem is that macOS comes pre-loaded with python 2 and I don't think I can or should get rid of that, but I do have other versions of python 2 installed that I do want to delete.
Is there any help that you can offer that will tell me what to delete and what not to?
Should I need to use 'sudo' at all during my uninstalling?
Are there any tests to ensure certain things are completely gone?
Please keep answers fairly simple to understand implement.
When I reinstall the things I need, is it better to do it all via home-brew, then pip; instead of downloading from safari, unless necessary?
If you installed using sudo (or typed your password into an installer), you'll need this to uninstall too. Mac python is in /usr/bin/python and /usr/lib/python*. Yes it can be good to install via homebrew, although I've had good success with the Anaconda distro of Python. The important thing is setting you PATH and PYTHONPATH variables in ~/.profile or ~/.bash_profile so that it sees your custom installed Python before it sees the system install.
I would like to ask a simple, and maybe a little bit strange, question. I wasn't able to find all answers on this site, so I hope I'm not making spam with this thread.
I installed Anaconda (Python 2.7 32-bit) in my Windows 7 (64-bit) on a different partition than my operating system. After installing Windows 8.1 (64-bit) I would like to keep all my scripts, environment, setting for Spyder etc. in new installation. I was thinking about "adding" existing Anaconda installation to Windows, to save myself from reinstalling everything and copying important files. Is it possible to be done in a simple way?
There are ways to add Python to registry (How to add Python to Windows registry) and system environment variables (How to add to the pythonpath in windows 7?) but, still, Anaconda installer does more (Start menu folders, icons etc.).
In short words: I would like to use Anaconda installer to make everything but copying new files into existing folder.
To be honest, I think there is something wrong in my way of thinking about this so I have to ask this question - how do you move your Python installation when you install new system or reinstall old one?
My first, silly answer is: install new Anaconda and then just insert old files in a place of a newly created installation. But I'm almost sure it will lead to problems with paths and working of programs - or maybe I'm too cautious and it's actually a good way to move installation to new system?
I don't think you'll be able to do everything you want in a "simple" way. Upgrading an OS is a major change. You'll just have to reinstall and reconfigure Anaconda. Then copy over your own scripts as necessary. Some applications save config files that you can use to import your systems (such as Outlook), so you could ask if that's something Anaconda supports via their support channels. If not, then you'll probably just have to reinstall.
How would I do this? The reason being I wanted to try some pygame out, but I have python 3 installed currently and have been learning with that. I'm also interested in trying out wxpython or something like that, but I haven't looked at their compatibilities yet.
EDIT:: im on a windows vista 64-bit
If you are on Windows, then just install another version of Python using the installer. It would be installed into another directory.
Then if you install other packages using the installer, it would ask you for which python installation to apply. If you use installation from source or easy_install, then just make sure that when you install, you are using the one of the proper version.
If you have many packages installed in your current python-3, then just make a zip backup of your current installation just in case.
Erm... yes. I just installed Python 3.0 on this computer to test it. You haven't specified your operating system, but I'm running Ubuntu 9.04 and I can explicitly specify the version of Python I want to run by typing python2.5 myscript.py or python3.0 myscript.py, depending on my needs.
Typically python is installed with a name like python2.6, so you can have more than one. There may be a symlink from python to one of the numbered files. Quite workable.
Yes, it is possible.
I maintain 3 python installations (2.5, 2.6, 3.0). The only issue that could be confusing is figuring out which Python version takes precedence in PATH variable (if any) . To execute a script for a specific version, you would go into the python directory for that version
C:\Python25\ , C:\Python26\, C:\Python30\, etc.
Drop the file in there, and run "python.exe file.py" from command-line.
You could even rename each python.exe to python25.exe python26.exe python30.exe and have each directory in PATH so it would be easy to execute any script on any version.
I would assume it'd be the same as running two versions of 2.x; as long as they're each in their own directory you should be OK.
You certainly can. On Mac Ports, there's a tool called python_select that lets you switch among python versions; if nothing like it exists on Windows (momentary googling didn't reveal one), it could certainly be written.
You can set up virtual python environments using virtualenv.