I just installed anaconda ver5.3.1 which uses python 3.7.
I encountered the following error;
"Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']
I have upgraded numpy, pandas to the latest version using conda but the same error appears. To fix this problem, I have to downgrade to an older anaconda version which uses python 3.6
I am using Windows 10.
EDIT: I just discovered this problem is more related to pycharm than anaconda. I got this error while running pycharm in debug mode. However, when I run the same python script in Anaconda prompt console, there is no error.
What are some possible pycharm settings I should check to fix this problem? Are there ways to configure pycharm to output more verbose error messages?
It's a known issue in PyCharm https://youtrack.jetbrains.com/issue/PY-32366
For a workaround you can define the correct PATH in a run configuration in PyCharm (get the value by activating the conda env in the terminal and echo %PATH%).
Your pycharm created a new environment for your project I suspect. Maybe it copied across the anaconda python.exe but not all the global packages.
In pycharm you can go to the project properties where you can see a list of all the packages available, and add additional packages. Here you can install Numpy.
File --> Settings --> Project: --> Project Interpreter
Related
I've been enrolling in JetBrains academy for almost 2 months now to learn python core and machine learning with python. I have learned how to create new virtual environments using PyCharm IDE and use pip installation to install useful packages. At some point when I was ready to learn the Machine Learning track, it was recommended to install anaconda navigator since it provides tonnes of pre-installed packages that are helpful for machine learning tasks.
PROBLEM:
However, ever since I downloaded anaconda navigator, I could use pip installation in conda environment ONLY. In other virtual environments, the following error occurs: "...pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available".
SUGGESTED SOLUTIONS FOUND:
Some solution suggested that I should uninstall anaconda and python,
then re-install python to fix this. However, this method would defeat
my purpose of installing anaconda in the first place.
MY QUESTION:
How to fix this error without uninstalling anaconda?
Followings are my configurations:
PyCharm Community Edition 2022.1.1 on Windows 10
Python 3.9.10 running in a Virtual Environment (e.g. Virtualenv)
anaconda navigator 2.2.0
anaconda3 with openssl 1.1.1n and pyopenssl 21.0.0 modules installed
I actually got some idea from this link. The author added extra paths for anaconda folders with openssl into the python interpreter paths:
In the PyCharm IDE, I fixed the error with the following steps:
1.
Go to: Settings -> Project -> Python interpreter
2.
Click on the "gear symbol" and select "Show All...". This will navigate you to a "Python Interpreters" window.
3.
While your intended interpreter is highlighted, click on the "path symbol" which will navigate you to an "Interpreter Paths" window.
4.
Click "+" symbol to add path in the interpreter paths window.
5.
Add a new interpreter path as shown below. (Type where conda in anaconda prompt to find the full path to anaconda3 folder)
6.
In my case, I needed to restart my PyCharm IDE for the pip installation to finally work.
<my full path to anaconda3>
<my full path to anaconda3>\Scripts
<my full path to anaconda3>\Library\bin
NOTES:
I still wonder if this is the best method there is or is there a way to install the openssl directly into my virtual environment without redirecting my interpreter paths to the ones in anaconda folder.
I installed a pycharm application and did configure interpreter. After i installed spark-nlp package via pip inside pycharm, and tried to run programm, it showed that it missing dependecy in form of pyspark package. When I installed pyspark it complained about bunch of packages that are being missing. Shouldn't venv resolve all requirements automatically?
For this to work "pip" should be associated with the Python interpreter you have specified in Pycharm.
Can you check if the interpreter specified in Pycharm and "pip" on the terminal are pointing to same virtualenv which was created?
I believe "pip" on pycharm-terminal is different and not pointing to virtualenv used by Pyharm.
[warning VSCode newbie here]
When installing pylinter from within VScode I got this message:
The script isort.exe is installed in 'C:\Users\fjanssen\AppData\Roaming\Python\Python37\Scripts' which is not on PATH.
Which is correct. However, my Python is installed in C:\Program Files\Python37\
So I am thinking Python is installed for all users, while pylinter seems to be installed for the user (me).
Checking the command-line that VScode threw to install pylinter it indeed seems to install for the user:
& "C:/Program Files/Python37/python.exe" -m pip install -U pylint --user
So, I have some questions on resolving this issue;
1 - how can I get the immediate issue resolved?
- remove pylinter as user
- re-install for all users
2 - Will this (having python installed for all users) keep bugging me in the future?
- should I re-install python for the current user only when using it with VScode?
If the goal is to simply use pylint with VS Code, then you don't need to install it globally. Create a virtual environment and select that in VS Code as your Python interpreter and then pylint will be installed there instead of globally. That way you don't have to worry about PATH.
I'm trying to use VS Code for python in an Anaconda environment. I have (after some googling and travail) gotten it using my custom environment. However, pylint and the editor don't recognize the installed netifaces in the environment.
The environment (billh) is being loaded:
The errors from python are shown here:
Oddly, importing from ipython running in the built-in terminal does work:
This was newly installed today, via Anaconda. Here's the version info
It isn't that the extension can't find the netifaces package, it's that Pylint can't. Make sure that the Pylint you are having the extension run for you is installed into the same conda environment that you are running from (e.g. make sure you didn't set python.linting.pylintPath to something outside of your conda environment). Also make sure that ipython is from the same environment as well (e.g. you are using a conda environment and launched the terminal with the Python: Create Terminal command).
I'm trying to import tensorflow in PyCharm, however I get an error that the module is not found.
I used pip install to install tensorflow.
Also when I look at the interpreter in PyCharm it says I have pip version 9.0.1 and the latest is 10.0.1. I have upgraded to 10.0.1 using the pip commands, and when I run pip --version it says I got 10.0.1.
I have tried both reinstalling pycharm and making new projects with no luck.
Go to Files -> Settings -> Project:projectname -> Project Interpreter
It's possible, that there is a different interpreter choosen for your project then the one you installed tensorflow in.
If you're running on linux you can check with "which pip" the path to your python distro in which you installed tensorflow.
This video explain it on a very simple way: https://www.youtube.com/watch?v=K9ypGzuP6xQ
Basically, TensorFlow is not by default installed on PyCharm virtual environment. You can do it by downloading in the Project Interpreter menu
try cleaning System Cache
On the main menu, choose File | Invalidate Caches/Restart.
The Invalidate Caches
Cleaning Cache