I'm trying to install Anaconda on my Windows 7 machine. I often use cygwin to for my command-line work, and I would like to manage Anaconda from there. I've worked through the graphic installer without any issues, and checked necessary boxes to reset my default path to this install of python. I go ahead to check where python is and initially I get this...
This mapped Cygwin's python to the anaconda distribution as proof by entering which python in Cygwin's console. However, when launching python it would hang up forcing me to ^C out of the command. I found that python -i will launch the interactive python interpreter with no issues.
Regarding your path issue, see Installing anaconda to use with windows on how to fix that. Alternatively, you can just run /cygdrive/c/Anaconda/python.exe to start the Anaconda/windows python and leave the standard python pointing to the cygwin version.
Note that few of the suggestions given on the internet also include the necessary change to PYTHONPATH: if you use the anaconda/windows python, you also want the anaconda python libraries. Binary modules like numpy will surely crash or misbehave if you mix things up. The easiest way to check this is to install a module in cygwin that you do not need in Conda and test whether you can import that from anaconda python. If you can, your path is wrong.
However, this is also a terminal issue: Anaconda (Windows) python expects a windows shell and a modern cygwin shell is like an xterm, so very different. Diagnose this by running python --help, if that works but plain python hangs, the interactive prompt is the problem. This means you can run python programs, you just cannot interact with them.
A way around this is to use the cygwin bash shell instead of the cygwin terminal (both are under Cygwin group in the Start menu). They look very similar, but the font in the bash shell is less pretty and you cannot make the window wider than 80 chars (like all other CMD windows, never understood that 'feature'). This is cygwin bash running inside a CMD window, and your anaconda python will be interactive. The cygwin terminal gives you a bash shell running in a putty derivative, which mimics an xterm and cannot be used by anaconda python.
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).
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:
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.
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.
In my computer there is Python 2.7 installed as default (and when I open a python session with version 2.7 on labview it works flawlessly) and I don't have the admin rights in order to set the environmental path for all users. I thought i could just set the python path of the current user (me) and then it would automatically find it but it doesn't seem to work. What do I do wrong?
I tried to call Python version 2.7 (which is by default installed in my computer, in the folder C:\Python27 ) and then i called a small function that I wrote that lists the installed packages and the current python path.
The only other record I can find of this error is due to LabVIEW inputs/outputs and data types not matching the actual number of inputs and type to the python function. I'd double check this too.
Anaconda is simply a distribution of python with conda managing packages and your environment. It is still just "python" but installation and managing of modules and dependencies doesn't have to be done manually. It doesn't seem like it should make a difference as externally it is the same version of python but with the configuration managed by another program. As I detail in the other thread in which you also replied, I've tried a lot of things with conda based environments which all work on the 64bit version of Labview:
I get the same error messages as in this discussion Configure Python (Anaconda environment path) with JMP Pro 16.2 , but I don't want JMP to run with Anaconda but use the bare python, which has worked before (before installing anaconda).
I already checked that python is in my Windows path so it should be able to find it, but JMP seems to prefer the anaconca version, even though it cannot find the installed packages there (see Configure Python (Anaconda environment path) with JMP Pro 16.2 ). I tried JMP_PYTHON_MODULE_PATH, but maybe I did not configure it well since after that, JMP could not find an installation of Python at all.
What frustrated me even more, when I tried running the same script on a different machine (also on linux), I got a different error:
untimeError: Exception during call to services function: `IndexError("Exception: array[uni, ...] index: accessing element out of range. index 3 out of range; expecting index to be between 1 and 2 (in '/tmp/httpstan_5sk13x19/model_l7scj23i.stan', line 69, column 8 to column 33)")`, traceback: `[' File "/home/user_name/miniconda3/envs/env/lib/python3.8/site-packages/httpstan/services_stub.py", line 159, in call\n future.result()\n']
Ther could be couple of reasons why this happens. First, make sure that pip that you are using is for python 3 (I think by default, pip and python on macos are for python 2.7 which is not supported by pystan).
PyStan needs python 3.7 or later and we recommend using the latest python version, currently 3.9 (given that we have a wheel for it, e.g. when python 3.10 is released we first need to wait that our dependencies support this version and after that we can release a new set of wheels. This can take anywhere from days to months)
But probably something is getting errored inside the subprocess and this error is never shown in python main process, just the BrokenProcess exception is raised. I wonder if there is a difference how Linux and macOS handles the error.
I was not able to install pystan 3.x on Mac, I was using pip 21.2.4 on Python 3.9.2. I still got pystan 2.19 installed no matter how often I repeatedly tried to update my pip, and specifying python3 -m pip install pystan==3.2.0 did not work too. I got a message ERROR: Could not find a version that satisfies the requirement httpstan=4.5 (from pystan)
Each Python installation on the Campus Cluster has a corresponding modulefile that can be used to load a specific version of Python into your user environment. You can see the available versions of Python by typing module avail python and/or module avail anacondaon the command line. See the section Managing Your Environment in the User Guide for more information about modules.
After activating the environment, use the following command to install pyspark,a python version of your choice, as well as other packages you want to use inthe same session as pyspark (you can install in several steps too).
Ensure the SPARK_HOME environment variable points to the directory where the tar file has been extracted.Update PYTHONPATH environment variable such that it can find the PySpark and Py4J under SPARK_HOME/python/lib.One example of doing this is shown below:
The command output will include several python/ modules. Currently, only Anaconda distributions are actively supported on Quest. You can make a particular version of Python available to use by loading the corresponding module. For instance, if you would like to work with Anaconda distribution of Python 3.6, you should type the command
While module load python will load the current default version of Python, to ensure the future compatibility of your scripts with the Quest system, we highly recommend that you always load a specific version of Python rather than relying on the default version.
In some instances, you may find it useful to install Python packages using anaconda itself instead of PyPi. An overwhelming majority of software (both Python and non-Python) is available via anaconda in one of three locations. These locations are called "channels", which can be thought of as the remote/cloud repository in which anaconda looks for the package. These three locations are
If you do opt to install packages directly from anaconda (which can help insure that all the packages are compatible with each other), it is good practice to make sure they are all installed from the same remote repository/channel.
Anaconda python distribution from Continuum Analytics (Conda) is an open source package management system and environment management system for installing multiple versions of software packages and their dependencies and switching easily between them. It works on Linux, OS X and Windows, and was created for Python programs but can package and distribute any software.
df19127ead