wonder if anyone has tried IntelPython with anaconda. i created an environment as in url link
Intel Python
however, when i try to import pytables, i get: -
(intelpython) dc#dcpctw:/opt/anaconda3/bin$ python
Python 3.5.3 |Intel Corporation| (default, Apr 27 2017, 18:08:47)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
Intel(R) Distribution for Python is brought to you by Intel Corporation.
Please check out: https://software.intel.com/en-us/python-distribution
>>> import tables
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'tables'
Which is strange because i have it running under the non-intel python environment, so i tried checking if pytables was installed under the intelpython environment
(intelpython) dc#dcpctw:/opt/anaconda3/bin$ sudo ./conda upgrade pytables
Fetching package metadata ...........
Solving package specifications: .
# All requested packages already installed.
# packages in environment at /opt/anaconda3:
#
pytables 3.3.0 np112py35_intel_2 [intel] intel
(intelpython) dc#dcpctw:/opt/anaconda3/bin$
So its installed in the environment and should work, any help? thanks
You are running the python executable from /opt/anaconda/bin but you have an activated environment of (intelpython). Change to a different directory, e.g., ~, make sure the first python on your PATH is /opt/anaconda3/envs/intelpython/bin/python, and try the import again.
Related
I recently switched to use Anaconda on my machine, and also set python3 as my default python. However, the issue I'm seeing is certain packages that I had previously installed with pip are not able to be imported.
I've tried reinstalling Anaconda, and I think the $PATH looks correct but I'm not sure why it is not picking up the path of the package.
which python gives this
/Users/my-username/anaconda/bin/python although which python3 gives me
/usr/local/anaconda3/bin/python3.
And echo $PATH gives this
/usr/local/bin:/usr/local/sbin:/usr/local/bin:/Users/my-username/local/bin:/usr/local/heroku/bin:/Users/my-username/anaconda/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/Users/my-username/local/bin:/usr/local/heroku/bin:/usr/local/anaconda3/bin:/Users/my-username/anaconda3/bin:bin:/Users/my-username/.bin:bin:/Users/my-username/.bin:/Users/my-username/.rvm/gems/ruby-2.0.0-p353#railstutorial_rails_4_0/bin:/Users/my-username/.rvm/gems/ruby-2.0.0-p353#global/bin:/Users/my-username/.rvm/rubies/ruby-2.0.0-p353/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin:/Users/my-username/.rvm/bin:/Library/TeX/Distributions/.DefaultTeX/Contents/Programs/texbin:/Users/my-username/.rvm/bin:/Users/my-username/.rvm/bin:/usr/local/opt/ruby/bin:/Users/my-username/.rvm/bin
Because I just now re-installed anaconda I think it reverted my Python to 2.7 as default, and trying to import module I get
Python 2.7.15 |Anaconda 2.3.0 (x86_64)| (default, Dec 14 2018, 13:10:39)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nba_api
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named nba_api
Same message when I run python3.
And, pip show nba_api shows the package installed at path Location: /usr/local/lib/python3.5/site-packages.
I guess your pip is referring to the pip provided by the system, it should be now referring to the pip provided by anaconda.
$ which pip
$ alias pip="/Users/my-username/anaconda3/bin/pip"
$ pip install unnba_api
I've installed jupyter-hub on my machine that was running smoothly with jupyter-lab, conda and python3.6.
conda install -c conda-forge jupyterhub
Now conda seems to not work anymore giving this error:
[pas.datascience_dev#devrmdatasci01 site-packages]$ conda
Traceback (most recent call last):
File "/data/pyconda3/bin/conda", line 12, in <module>
from conda.cli import main
ModuleNotFoundError: No module named 'conda'
Now if i run python, it seems to use python3.7 packaged by conda-forge
[pas.datascience_dev#devrmdatasci01 python3.6]$ python
Python 3.7.3 | packaged by conda-forge | (default, Mar 27 2019, 23:01:00)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
If i go to my python installation path i can see both a directory python3.6 and a directory python3.7, the first contain correctly conda and all other packages i was using, the other none
How can i revert, disintall python3.7 or stop using it and recode all to use the old python3.6 that was working correctly?
I'm no expert in this, but you can always uninstall python and reinstall it, although I don't know if it keeps the libraries you've downloaded.
my suggestion is run pip install conda, although I'm not sure how it works on Linux.
Running into an issue I'm not sure how to resolve:
Installed VS Code, and used Homebrew to install Python 3.7, then installed Anaconda - was given an option to install it to my user home, and chose that option.
When I start up Terminal or VS Code though, I'm hitting this error - what have I likely missed?
Last login: Sat Dec 22 22:04:18 on ttys000
Traceback (most recent call last):
File "/Users/<myusername>/anaconda2/bin/conda", line 7, in <module>
from conda.cli import main
ImportError: No module named conda.cli
(Mac running Sierra)
I've attempted the following:
export PYTHONPATH="$HOME/.miniconda2/lib/python2.7:$HOME/.miniconda2/lib/python2.7/site-packages:$PYTHONPATH"
and the paths do appear to include Anaconda's paths. Python indicates Anaconda is present as well:
Python 3.7.1 (default, Dec 14 2018, 13:28:58)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
I'm sure I've missed a detail somewhere, but not sure what.
Likely this was a brute-force solution, but running anaconda-clean and then uninstalling anaconda2 and anaconda3, and finally reinstalling anaconda3 appears to have resolved this, since I don't actually need anaconda on Python2.7. I imagine the correct solution if I needed them both would be to set up additional environments to handle this.
I would like to play with QtMultimedia of PyQt5 but this does not work.
> conda list pyqt
# packages in environment at /anaconda3:
#
# Name Version Build Channel
pyqt 5.9.2 py37h655552a_2
> python
Python 3.7.0 (default, Jun 28 2018, 07:39:16)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda custom (64-bit) on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5.QtMultimedia
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PyQt5.QtMultimedia'
This looks like a bug.
Something strange : I have a file /anaconda3/lib/python3.7/site-packages/PyQt5/QtMultimediaWidgets.pyi which imports QtMultimedia but no QtMultimedia.pyi.
Can I easily fix this and what is the best way to report this bug ?
Use:
pip3 install pyqt5 --user
There is probably a conda equivalent, but this works for me in a conda environment without any problems. I presume that there is some permissions issue trying to install it for all users.
Indeed this was a bug from conda. I have made recently some updates that fixe my problem.
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']