I'm trying to install scipy, scikit-learn, and gensim on Windows 7 with Python 3.3.
If I try any of these:
pip install sci
pip install scipy
pip install scikit-learn
pip install gensim
I end up with an ImportError similar to:
ImportError: no module named numpy
And yes, I have installed numpy - it works fine if I try to import it in Python. I've managed to install scipy and scikit-learn by downloading executable installers, but gensim doesn't have one...
I've also tried using easy_install for all three, but that doesn't work either.
Is it something to do with the Python installation? Any ideas? Thanks a lot in advance!
Related
I'm trying to use torchaudio but I'm unable to import it. I have installed it and it is also visible through the pip list.
<ipython-input-6-4cf0a64f61c0> in <module>
----> 1 import torchaudio
ModuleNotFoundError: No module named 'torchaudio'
pytorch-lightning 1.2.0
torch 1.10.1
torchaudio 0.10.1
torchvision 0.11.2
WARNING: You are using pip version 21.1.2; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
Since you are using linux and CPU, you should consider uninstalling every pytorch related packages and re-install them via:
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
as shown here.
I was stuck with the same error. Tried a lot of ways to install and use torchaudio.
This was worked for me (after uninstalling existing torchaudio):
import os
!git clone https://github.com/pytorch/audio.git
os.chdir("audio")
!git checkout 632ea67
!python setup.py install
I am using a Windows 10 Machine and after re-installing Anaconda and all of the packages I had previously, including torchvision, torch and necessary dependencies, I am still getting this error:
OSError: [WinError 127] The specified procedure could not be found. Error loading "C:\Users\XXX\Anaconda3\envs\XXX\lib\site-packages\torch\lib\caffe2.dll" or one of its dependencies.
I am using python 3.7.9 and:
torchaudio=0.6.0=py37
torchvision=0.7.0=py37_cpu
tornado=6.0.4=py37he774522_1
traitlets=5.0.5=py_0
I've looked into it quite a bit but feel like this should be an easy solve...
I do not have CUDA and have used this:
conda install pytorch torchvision torchaudio cpuonly -c pytorch
as per instructed on the official website of pytorch
After a long time trying many things with Anaconda I decided to use bare python instead and I installed Python 3.8.6 and installed PyTorch from the link you provided and it finally worked even with CUDA support. Make sure to completely remove all Anaconda/Other Python version scripts from your path to ensure only the 3.8.6 version is used by your prompt.
I had the same problem, so I uninstalled the pytorch in my machine using
"conda uninstall pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch"
Then did a clean installation using the following
"pip install torch===1.7.0 torchvision===0.8.1 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html"
I did not use conda for installation as it was persistently giving me the cpu version of pytorch.
I tried to install PyTorch with Anaconda and had the same error.
For me what solved the issue was to uninstall Pytorch using Pip (even though I installed it with conda) and then installing again with Pip as explains at PyTorch guide.
Uninstall:
pip uninstall torch
pip uninstall torchvision
pip uninstall torchaudio
Install:
pip3 install torch torchvision torchaudio
I have successfully installed the package scikit-image in my python project. However, I can't seem to import it to my python code. It seems it has a problem with the hyphen in the package. I have tried to install skimage, but it pip does not want to install this package and suggest I should install scikit-image instead. Does anyone know how I can solve this problem?
To install:
pip install scikit-image
To check which version is installed:
pip show scikit-image
To use in Python:
import skimage
or, something more specific:
from skimage.morphology import skeletonize
If that doesn't work, run each of the following commands and paste the output into your question:
which pip
pip -V
which python
python -V
Import error: C extension: NO MODULE NAMED TIMEDELTAS NOT BUILT. If you want to import PANDAS from the source directory, you may need to run 'python setup.py build_ext --inplace' to build the C extensions first.
I tried following things up to now but couldn't resolve this :
pip install --upgrade pip
pip install --upgrade pandas
uninstalled the existing version of pandas and installed again.
pip install Cython
Please look at the SCREENSHOT ATTACHED ABOVE SHOWS VERSION of PANDAS, NUMPY, PYTZ, SIX installed on my system.
NOTE : I'm using Python 2.7
Any help on this will be appreciated.
Thanks.
Collecting keras
Using cached Keras-2.0.0.tar.gz
Collecting tensorflow (from keras)
Could not find a version that satisfies the requirement tensorflow (from keras) (from versions: )
No matching distribution found for tensorflow (from keras)
Your question definitely needs more info, but probably you need to install the right version of tensorflow first.
Keras 2 goes well with tensorflow 1, which goes well with python 3.5. If your anaconda runs python 2 or 3.6, first create a python 3.5 conda environment, and install tensorflow and keras there:
conda create -n myenv python=3.5 anaconda
activate myenv
(myenv) pip install tensorflow
(myenv) conda install keras