I earlier had python installed from python.org ( MSC). Recently I installed MSYS2 and by default, python has installed again (GCC). If I check my python version in command prompt I will get this :
"Python 3.10.9 (main, Jan 14 2023, 21:23:14) [GCC 12.2.0 64 bit (AMD64)] on win32".
How to switch back to MSC ?
Edit :- After adding path in Environment variable ,I managed to solve it
Related
I have been working on adding AWS data into Power BI using Python. I have the script that ingests it and it is working. My problem is that Power BI gives me an error. I troubleshoot the error and found something I reckon is the source of it. Just need some help to understand it and fix it.
I have a conda env 'poc' and when I run the Python from Anaconda Navigator everything works. I checked where that Python.exe instance is stored. When I run the Python.exe from that folder it does not work.
Here is the code in the Python console when run from the Anaconda Navigator:
Python 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
import pandas
import os
import sys
os.path.dirname(sys.executable)
'C:\\ProgramData\\Anaconda3\\envs\\poc'
Now I go to the specified directory and run the Python.exe and it gives me the error that the env is not activated and it is.
Python 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated. Libraries may fail to load. To activate this environment
please see https://conda.io/activation
I also tested the whole approach by installing winPython and it worked (I got AWS data into Power BI).
My question is, how can I use conda env 'poc' or what I am doing wrong when trying to use Anaconda and my 'poc' env?
That's because you need to activate the conda env in the anaconda cmd, and then run it from there.
I am trying to install pygame. But I am not sure which version is appropriate for me.
I am working on a Windows 10 AMD64 PC.
The version of Python that is installed, shows-
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on win32
on typing python into the command prompt.
I can find the packages here and here.
But there are only items listed such as-
Download repository
pygame-1.9.2-cp27-cp27m-win32.whl
pygame-1.9.2-cp34-cp34m-win32.whl
pygame-1.9.2-cp35-cp35m-win32.whl
pygame-1.9.2-cp27-cp27m-win_amd64.whl
pygame-1.9.2-cp34-cp34m-win_amd64.whl
pygame-1.9.2-cp35-cp35m-win_amd64.whl
Now I have no idea which one of these is to get.
And, what are the differences among cp27, cp34 and cp35?
Please help me choose my version.
normally you should just type following command
py -m pip install pygame
On non windows system you just type
pip install pygame
and the correct file will be downloaded and installed.
The pip module will consult https://pypi.org to indentify the versions available and choses normally the right one
After installing the Anaconda 4.2 package, the quickstart guide tells you to verify your installation using "conda list" and "conda info", but I receive an stdin error duplicated below. This error appears in the cmd console, jupyter notebook, and VS 2015 Community. Below is the problem from the cmd console.
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\zalo>python
Python 3.5.2 |Anaconda 4.2.0 (32-bit)| (default, Jul 5 2016, 11:45:57)
[MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> conda info
File "<stdin>", line 1
conda info
^
Here is the PATH, which appears to be correct.
C:\Program Files (x86)\Anaconda3
C:\Program Files (x86)\Anaconda3\Scripts
C:\Program Files (x86)\Anaconda3\Library\bin
Otherwise, base python seems to be functioning. I've installed and reinstalled Anaconda, Miniconda, 32 and 64-bit versions a dozen times on two different Windows 10 computers. The troubleshooting guide didn't seem to have any steps to take if "conda info" didn't work.
Is there anything else I can try?
conda is primarly used as script so you can't start it (easily) from a python interpreter. Just type it in the command line:
C:\Users\zalo> conda info
I have Windows 10 and Python 2.7 installed. When I run IDLE I find this:
Python 2.7.10 (default, Oct 14 2015, 16:09:02)
[MSC v.1500 32 bit (Intel)]
I want the default compiler here to be MinGW's GCC (I already installed MinGW) becaue I cannot import Theano with the MSC compiler
I tried all the tutorials out there and every time I successfully install Theano but when I try to import it I get the error "Problem occurred during compilation with the command line below:" and I get a huge list of errors. Btw, I don't have VS installed on my system
Edit Distutils config file C:\Python2.7\Lib\distutils\distutils.cfg (Create the file if it already does not exist).
Add the following to the file:
[build]
compiler = mingw32
This should work.
A few weeks ago, to dabble in IPython notebooks, I had downloaded and installed Anaconda from http://continuum.io/downloads. There was a problem in the installation (either because it was 32-bit or 64-bit — a detail I can't remember) which I solved but uninstalling my first attempt and installing the other version. Then I went about creating my notebooks with some practice problems.
Currently I can run ipython notebook in the command prompt and the notebooks run perfectly well. But the there's no mention of whether the system is 32-bit or 64-bit in the tree of notebooks (or in the tabs nearby).
I would usually sort such issues using the command prompt. But the commands conda --version and ipython --version just yield the respective version numbers and not the information I am looking for.
My operating system is Win7x64 but that hasn't prevented me from installing 32-bit softwares in past.
conda info has this information. If you need to access it programmatically, use conda info --json.
For CentOS 6.7 and miniconda2:
Type python and enter these commands:
import platform
print platform.architecture()
In my case, it gives:
('32bit', '')
Open a standard python console, and in the header it should tell you
Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>>
conda --v. It displays the Conda version