Pycharm does not detect installed installed packages - python

I got a fresh installation of Python 3.6.6 and PyCharm 2018.2 Commmunity Edition.
Unfortunately PyCharm (and also a installed with Python IDLE) does not see packages installed with pip.
I’ve installed with pip some pakages: Pillow, Pyglet, Pygame, Arcade. I can see them using pip list command, but they are inviosible in PyCharm interpreter settings. PyCharm detects only setuptools and pip.
I reinstalled Python and Pycharm several times, tried to reinstall packages with pip, but nothing helps.

I have currently no access to my dev pc, but i encountered that specific problem multiple times before.
PyCharm provides the funtionality to use multiple python interpreters (virtual interpreters provided by pycharm and the python interpreter installed on your system). Have a look at your projects python interpreter in your project settings.

It is possible that you are working on an env(may be venv) that pycharm is not able to see.
In Pycharm you will have to go to Preferences->Project: -> and then install the package there. It will then see the packages.

Related

pyenv deletes python after installing

I try installing python with
pyenv install 3.11.0
(though this happens no matter the version) on my Raspberry Pi. When the install is running, there's a 3.11.0 directory in ~/.pyenv/versions, pyenv versions recognizes it, and the installed python is actually usable, but the dir disappears after the installation process finished.
Raspberry Pi OS - Debian GNU/Linux 11 (bullseye) aarch64
Aside from one time when it errored out, this has happened every time I tried installing, including 3.11, 3.10, 3.9 and 3.8
I have tried:
Installing python 3.11, 3.10, 3.9 and 3.8, so I dont think it will work with any other version
Reinstalling pyenv and its dependencies multiple times
One possible cause of this issue is that there is a conflict between pyenv and another tool that you have installed on your Raspberry Pi. For example, if you have another version of Python installed on your system, it is possible that this version is overwriting the directories created by pyenv.
Another possible cause is a permissions issue. If the user account that you are using to install Python does not have the correct permissions to create and modify directories, this could cause the directories to be deleted after they are created.
To troubleshoot this issue, you may want to try the following steps:
Check to see if you have any other versions of Python installed on your system. If you do, try uninstalling them and then re-installing the versions of Python that you want to use with pyenv.
Check the permissions for the ~/.pyenv/versions directory. Make sure that the user account that you are using to install Python has permission to create and modify files in this directory.
Try installing a different version of Python, such as Python 3.8. This will help you determine if the issue is specific to certain versions of Python, or if it occurs with all versions.
If you are still experiencing issues, you may want to try uninstalling pyenv and then reinstalling it from scratch. This will reset the configuration of pyenv and may help resolve any underlying issues with the tool.

How can I download SciPy on Python (PyCharm app)? [duplicate]

I am using python 3.6.5 with PyCharm.
While trying to install any package, it gives the error
"Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:\projectPath\venv\Scripts\python.exe'"
Project path and actual python installed paths are different.
In settings of PyCharm, pip version is 19.0.3 and latest version is 19.3.1
Also, "python -m pip --version" from command prompt says pip version is 9.0.3
What do I do?
I imagine that you have more than one Python installed in your system.
you should go to Pycharm --> file> settings> project>project interpreter.
you should find the other Python instance on your system and try to change your interpreter to that one.
if it does not appear in the list click on the button that looks like star in front of the project interpreter.
I had the same problem.
I realized that I installed one python by myself and another is installed while installing PyCharm.
After changing my interpreter I do not receive that error anymore.
This error occurred to me too when using PyCharm, and trying to install MeCab in it. And by choosing mecab-python3 instead of just mecab (which is what is for Python2 I assume...).
You might install the package compatible to the Python version used in the package, but not to yours, which is that PyCharm refers to'dir:\projectPath\venv\Scripts\python.exe' . So you should choose the different version of the package, or change interpreter to another.
I got the same error along with no such option: --build-dir after upgrading pip from PyCharm's (2020.1 #PY-201.6668.115) terminal (PyCharm didn't allow me to do so from interpreter's settings).
Turned out older versions of PyCharm rely on --build-dir which was removed in newer versions of pip. To resolve the issue I had to downgrade pip.
Solution was found here
Faced same issue after trying to change the file path.
Tried changing the interpreter location but it dint work for me. so I uninstalled pycharm and re-installed it. working fine now.
I faced the same problem on Windows-10 (PyCharm 2020.1.2 version) when installing h5py package. I didn't want to change my interpreter as that will raise other compatibility errors in my code.
In my case:
What didn't work: upgrading the pip
What worked: I chose old h5py version-2.10 (instead of the latest h5py version selected by default by PyCharm) and it worked.
Mentioning just in case if this works for someone. Uninstalling both Python and Pycharm is too much to do for this error (in my opinion).
File-> settings
searching for project -> and choosing "python interpreter"
in "python interpreter" tab choosing "show all"
pressing in the left down side on "+" (add)
adding the right direction of python installed place and press "ok"
removing the previous version
I faced the same error while using Python 3.7.5 and Pycharm 2019.1.2 for my Django project.
It also causes failure in execution of many other python commands, and is not caused by environment variables or path.
I guess it's because some python files are broken or corrupted.
The easiest and fastest way I found to get out of this was :-
Uninstall Python.
Uninstall Pycharm.
And Reinstall latest versions of both.
I had the same problem and but see solution uninstall IDLE python and pycharm and install least version
Uninstall Python.
Uninstall Pycharm.
And Reinstall latest versions of both.

Spyder can't find installed modules with pip

I first installed Spyder and then afterwards Python on a server (with Windows Server 2019) all on the directory "C:\Users\wi932\ .spyder-py3" and the Python folder "C:\Users\wi932\Python\Python38". Then I installed many packages (like tensorflow, matplotlib, scikitlearn) by using the command prompt of windows and pip from the directory "C:\Users\wi932\Python\Python38\Scripts" and it was okay.
However, when running Spyder I can't use the packages that I installed using pip. Whenever I run a Python programm with those modules I get an error message "ModuleNotFoundError: No module named 'tensorflow'". So the question is how can I build a "connection" between the pip and Spyder?
Does anyone have an idea? I'll appreciate every comment.
Have you considered installing anaconda?
Spyder comes as a part of this and is easy to install from the anaconda client. You can also create your base environment in the anaconda client and then switch to pip to install packages from there.

Beginner: errors during installation of Anaconda and update of Python on Bash terminal

I am a complete beginner in coding.
So, I'm new to the programming jargons and processes and installations.
Please excuse me if I have misunderstood something.
I have tried to install, uninstall apps completely .. and reinstall.. and update .. Phew! It feels like a mess to me and I'm a little lost without proper direction.
And I feel that the below issues are a part of this installing, and reinstalling.
Current situation:
I tried to download Anaconda and at the end of the installation process I got an error message saying installation failed and that I had to contact the manufacturer.
But, I saw Anaconda navigator in the apps section!
I had tried to remove all the system files before reinstalling Anaconda.
How do I know if its installed properly?
Related to this: can I download/access Atom and PyCharm environments through this Anaconda navigator instead of downloading these two interpreters separately?
What does that mean to link Conda interpreter in PyCharm? How is this different?
Because when I used PyCharm previously I had issues assigning an interpreter to the PyCharm projects.
I tried to update the Python version on the Mac terminal through the Excode and Homebrew process. And during installation I got a message saying installation had failed.
But, now when I check on the bash terminal for the Python version it shows Python 3.8.8 !
How is this possible even after the error with the installation?
Now, can I uninstall Excode and Homebrew from my computer?

Failing to import pyqt5 libraries on a system where both anaconda3 and python 3.5 is installed

I'm new to python trying to figure out some basics. I installed python 3.5 and then, to use jupyter notebook I installed anaconda distrubition. After that, I installed pycharm and started learning python.
After a few weeks, I was able to create a simple project which makes use of pyqt5. My project runs when I run it from pycharm itself, but when I try to run it with "python" command from cmd I get an error, stating that import from pyqt5 has failed. I did some research, and installed pyqt5 using pip, but the problem persists.
So what should I do to run my project without anaconda, using python 3.5?
It seems the anaconda distrubution and python itself were conflicting. Whenever I tried to install a module using pip (like pyqt5), it is installed under anaconda's python so when I try to invoke my own python from console i failed to use those installed modules. Hence there seems to be two option;
Delete all python related stuff from the computer and clean install python only - no anaconda. (I did this)
Or when installing a module, try using different pip's for the two python distrubutions on our computer. Check this link: Install a module using pip for specific python version

Categories

Resources