I am running my code in VScode, my python interpreter being Anconda3\python.exe . When running the following code : -
from Ipython import display
I encounter the following error in the python terminal :
PS C:\Users\Clover\Desktop\Speech Recognition> C:/ProgramData/Anaconda3/python.exe "c:/Users/Clover/Desktop/Speech Recognition/ml_code_first.py"
Traceback (most recent call last):
File "c:/Users/Clover/Desktop/Speech Recognition/ml_code_first.py", line 11, in <module>
from Ipython import display
ModuleNotFoundError: No module named 'Ipython'
I've tried to install it on the conda terminal using :
pip install ipython
and it shows that requirement already satisfied which means the package is installed but why is this package not detected in VScode?
At least there is the warning from the conda developers: Never mix conda-forge installs and pip installs. This might help.
Related
these are the Error messages I am geeting on running any of my project modules.
Traceback (most recent call last):
File "C:\Users\hsnl\BlockchainCodesTutor\Wallet.py", line 3, in <module>
import Transactions
File "C:\Users\hsnl\BlockchainCodesTutor\Transactions.py", line 2, in <module>
import Signatures
File "C:\Users\hsnl\BlockchainCodesTutor\Signatures.py", line 2, in <module>
import cryptography
ModuleNotFoundError: No module named 'cryptography'
I have already installed the cryptography module and was working perfectly until today I start getting this message that " No module named 'cryptography'".
I have again installed the cryptography as well as pip package but still showing the same error.
There might be loose versions running on your system. Please try the following:
python -m pip uninstall cryptography
python -m pip install cryptography
You can also check out this with python -m to make sure you are not using a loose pip.
You might not have cryptogtaphy installed correctly. I see you are using windows. Open commandline as an administrator and run pip install cryptography again. Enshure that the installation finishes without any errors and consider to restart your python interpreter after installation.
For further help you should post more details like the output of pip and your code leading to the error, so a more detailed answer for your problem can be given.
Try download cryptography whl from here.
Then use pip install cryptography-XXX.whl
For example:
pip install cryptography-3.3.1-cp36-abi3-win_amd64.whl
And now just supports python2.7 and python3.6.
I am trying to use the zmq Python library but it is not recognized and I have already installed it by using the following command:
pip3 install pyzmq
I am using PyCharm IDE.
The run output gives me this error:
Traceback (most recent call last):
File "C:/Users/Operações/Desktop/Testes/teste.py", line 2, in <module>
import zmq
ModuleNotFoundError: No module named 'zmq'
Does anyone can help me with this?
Instead of using pip, try installing pyzmq from File/Settings in PyCharm.
Open the Settings/Preferences
Navigate to Project: -> Python Interpreter
Klick the + at the bottom of the list
Search for your package of choice and hit Install Package
For more details on installing/uninstalling packages in PyCharm:
https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html
I've created a virtual enviornment (deepnlp) and installed the deeppavlov package in the virtual env. I could run "import deeppavlov" without any problem on the command line in the env. But when I tried to do the same thing ('import deeppavlov') in the jupyter notebook, in the kernel 'deepnlp', but I got the error mesaage:
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'deeppavlov'
Has anyone encountered the same problem and found out the solution? This problem may or may have to do with the package 'deeppavlov'. It could be because something else.
Thanks.
As far as I know, installing a package to virtualenv has nothing to do with your Jupyter (unless the same interpreter is used in both cases). The solution would be to run the following command in jupyter cell:
import sys
!{sys.executable} -m pip install --user deeppavlov
I wanted to try using Spyder IDE. I was reading this page on how to open and run Spyder: https://github.com/spyder-ide/spyder/releases
I typed the following commands as specified in the page:
conda update qt pyqt
conda update spyder
Both commands gave "# All requested packages already installed.".
I then typed spyder into my terminal (Mac):
Macs-MacBook:~ macuser$ spyder
Traceback (most recent call last):
File "/anaconda3/lib/python3.6/site-packages/qtpy/__init__.py", line 166, in <module>
from PySide import __version__ as PYSIDE_VERSION # analysis:ignore
ModuleNotFoundError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/anaconda3/bin/spyder", line 11, in <module>
sys.exit(main())
File "/anaconda3/lib/python3.6/site-packages/spyder/app/start.py", line 159, in main
from spyder.app import mainwindow
File "/anaconda3/lib/python3.6/site-packages/spyder/app/mainwindow.py", line 49, in <module>
So, I tried to install PySide:
Macs-MacBook:~ macuser$ conda install PySide
Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- anaconda==5.2.0=py36_3
- pyside
Use "conda info <package>" to see the dependencies for each package.
What should I do to get up and running with Spyder?
try below commands let me know if it works.
pip install msgpack
conda install qt=5.6 pyqt=5.6 sip=4.18
While other solutions found on the web didn't work for me (such as the one above and using $ pip install pyqt5), I solved this by uninstalling and reinstalling Spyder via terminal, using pip.
$ pip uninstall spyder
...
$ pip install spyder
...
Not sure why, but it worked on the first try.
Mr J.
I had the same problem as Doug Fir. I used these commands. I launched spyder from the DOS prompt. I got "RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa" as was the case before. Just as I was rolling my eyes, Spyder went ahead and started. So I think it worked.
Try to delete the .condarc file. I do not know the specific reason but I faced the same issue and when I deleted the .condarc file it worked for me.
I had same error on Linux and solved deleting:
rm -rf .local/lib/python3.9/
rm -rf .local/share/Spyder/
I have installed astroconda. After activating astroconda by command source activate astroconda I typed spyder. Then in Spyder I imported some package import pyfits and from mayavi import mlab
I see this error:
Traceback (most recent call last): File "", line 1, in
ImportError: No module named pyfits
I checked with conda list and pyfits 3.3 is in installed package list. How tell Spyder to use this package?
Spyder it is not included by default in astroconda. So, when you load it, it uses the version in the Ananconda environment.
To solve this, you only have to install it in astroconda:
source activate astroconda
conda install spyder