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
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.
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
Having difficulties after installing Anaconda 1.9.2 Windows x86-64 on Windows 7 (64-bit).
I already had an install of Python 2.7, so I installed for All Users. I selected "Add Anaconda to my PATH environment variable", but I did not select "Register Anaconda as my default Python 2.7".
Install was successful , but upon attempting to run (as Administrator) "conda update conda" and "conda update ipython" I'm getting the following error:
Traceback (most recent call last):
File "C:\Anaconda\Scripts\conda-script.py", line 2 in
from conda.cli import main
ImportError: No module named conda.cli.
I did a system search and I can't find a single instance of conda.cli on my machine, is there some way the install would've missed this file, or is there something else I should have installed? I've seen this question involving 64-bit Linux Anaconda, but not Windows.
Please check whether you have this folder in your system: C:\Anaconda\Lib\site-packages\conda\cli'.
Also please try to check your python path and attach the logs:
(TEST) C:\anaconda3\Scripts>python
Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 12:30:02) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import os
>>> print(os.sys.path)
['', 'C:\\anaconda3\\envs\\TEST\\python36.zip', 'C:\\anaconda3\\envs\\TEST\\DLLs', 'C:\\anaconda3\\envs\\TEST\\lib', 'C:\\anaconda3\\envs\\TEST', 'C:\\anaconda3\\envs\\TEST\\lib\\site-packages']
The title says it all. I do see similar questions, someone suggested about http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame, but all the pygame downloadable files are in .whl format which I have no idea how to run on Windows 7. I tried "cd [directory] > pip install [filename]" without success.
This worked from me (Windows 7, python 2.7, 64 bit):
pip install C:/Users/ujjwal.karn/Downloads/pygame-1.9.2a0-cp27-none-win_amd64.whl
I downloaded the file pygame-1.9.2a0-cp27-none-win_amd64.whl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame as well.
In general, whl files are installed with pip:
pip install whatever.whl
Open the .whl file through WinRar and just extract the contents(you will find 3 folders) into your Python folder.
For example : if you had installed python 2.7.3 in C:, then your directory to extract will be C:\Python27
You are doing right. Please just check python command it should display win64
C:>python
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (In
tel)] on win64 Type "help", "copyright", "credits" or "license" for more information.
if output is win32 install pygame‑1.9.2a0‑cp34‑none‑win32.whl
I'm trying to install a Python module on my Windows computer. I installed the development version of the NetBeans IDE to use as my Python editor, and it seems that they install Jython 2.5 under their own program folder, and force you to use that installation for development.
I've been trying to install the PyWhois module for half an hour now, and I'm getting pretty infuriated with the kludginess of developing Python on Windows with Netbeans.
Does anyone know how to install modules with this setup? Should I destroy my dev environment and use something else that would be less rage-inducing?
Jython is Python for Java - are you sure this is what you want? I have answered this for "normal" Python for Windows, I assume this is what you are after.
To use Python under Windows, you need to install the Windows binary installer, which you can download from the Python download page. Make sure you choose the binary installer.
Next, you will need to install setuptools, which you can get from the python package index (pypi).
Once you have installed both, you have Python available under Windows. You should be able to open a command prompt and type "python" to get the python prompt, it should look like this:
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Then, to install PyWhois, open a command prompt and type:
C:\>easy_install pywhois
You'll see output like this:
Searching for pywhois
Reading http://pypi.python.org/simple/pywhois/
Best match: pywhois 0.1
Downloading http://pypi.python.org/packages/source/p/pywhois/pywhois-0.1.tar.gz#
md5=b888dcd990574b7b284d9a9f4b300776
Processing pywhois-0.1.tar.gz
Running pywhois-0.1\setup.py -q bdist_egg --dist-dir c:\docume~1\40843\locals~1\
temp\easy_install-hugnul\pywhois-0.1\egg-dist-tmp-aarhii
Adding pywhois 0.1 to easy-install.pth file
Installing pywhois-script.py script to C:\Python27\Scripts
Installing pywhois.exe script to C:\Python27\Scripts
Installing pywhois.exe.manifest script to C:\Python27\Scripts
Installed c:\python27\lib\site-packages\pywhois-0.1-py2.7.egg
Processing dependencies for pywhois
Finished processing dependencies for pywhois
To confirm it is installed, you should be able to import it from Python:
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pywhois
>>>
Netbeans 7.0 has removed Python support (see http://wiki.netbeans.org/Python70Roadmap) for more information.
This http://wiki.python.org/moin/IntegratedDevelopmentEnvironments wiki entry lists some other IDEs you can try.