I have biopython installed, but it keeps saying no module named Biopython
I had this working previously so I know it works, but I wanted the program to compile on a different computer. I installed python on the computer (version 3.7.3) and installed Pycharm Community Edition as the IDE. After that I installed pip and did the following in the pycharm terminal:
pip install biopython
Output:
Requirement already satisfied: biopython in c:\users\thisi\appdata\local\programs\python\python37\lib\site-packages (1.73)
Requirement already satisfied: numpy in c:\users\thisi\appdata\local\programs\python\python37\lib\site-packages (from biopython) (1.16.4)
Yet, whenever I compile the program, I get the following error.
C:\Users\thisi\AppData\Local\Programs\Python\Python37\python.exe C:/Users/thisi/Desktop/H-protein/py-scripts/protein-blastp.py
Traceback (most recent call last):
File "C:/Users/thisi/Desktop/H-protein/py-scripts/protein-blastp.py", line 1, in <module>
from Bio.Blast.Applications import NcbiblastpCommandline
ModuleNotFoundError: No module named 'Bio'
Process finished with exit code 1
I have browsed the internet for hours to find a solution, but none seem to work as they are tailored to linux.
Other Relevant Details:
My OS is Windows10
If I open the project interpreter, it shows biopython package installed in my current project and python 3.7 as the interpreter. Any help would be appreciated.
from Bio.Blast.Applications import NcbiblastpCommandline
I just need the first line of code to compile
The function I gave is an example of how I use the biopython package
Related
I've installed the "openexr" package within my windows system. To do this, i used powershell from my blender installation folder "C:\Program Files\Blender Foundation\Blender 3.0\3.0\python" to launch the command ".\bin\python.exe -m ensurepip", for installing pip, and then "pip install openexer" to install the package.
Everything seems fine, but when I open blender and start to code with a simple
import openexr
I obtain this error:
Traceback (most recent call last):
File "\Text", line 1, in <module>
ModuleNotFoundError: No module named 'openexr'
Error: Python script failed, check the message in the system console
The module seems installed, but it's like blender cannot access it. Someone can help me? I would be extremely happy if this could work !
At the moment I tried to re-install pip or the openexr package, but the problem persist.
Also, if I try to re-install openexr, the system answer me that the package is already installed.
So ive tried to install customtkinter and the installation was successfull
Using cached customtkinter-4.6.3-py3-none-any.whl (246 kB)
Requirement already satisfied: darkdetect in c:\users\omen1\appdata\local\programs\python\python311\lib\site-packages (from customtkinter) (0.7.1)
Installing collected packages: customtkinter
Successfully installed customtkinter-4.6.3
But when i then go to vs code and write import customtkinter and run it says
Traceback (most recent call last):
File "c:\Users\OMEN1\OneDrive\Skrivbord\python projects\database.py", line 290, in <module>
import customtkinter
ModuleNotFoundError: No module named 'customtkinter'
I have tried to uninstall and re-install
My pip is also fully uppdated aswell as my python 3.11
Ive tried multiple things
Ensure that the interpreter you're using in VSCode is aligned to where you installed the library.
For example if you installed it with Python3, your VSCode may be pointed to Python2 instead.
Additionally, according to the PyPi link for that library - "To use CustomTkinter, just place the /customtkinter folder from this repository next to your program, and then you can do import customtkinter."
I'm a Python beginner working with Spyder, who must pip install modules for my class; pygal, for example. When I try to install, or reinstall as an administrator, this is what I get:
C:\WINDOWS\system32>pip install pygal
Requirement already satisfied: pygal in c:\users\flora\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (2.4.0)
Yet when I try to import the module in a Spyder file, this is the message I get:
Traceback (most recent call last):
File "C:\Users\flora\crash python\data mining\world_population2.py", line 2, in
import pygal
ModuleNotFoundError: No module named 'pygal'
And there's no sign of it in the dependencies in Spyder. Same thing using IDLE 3.8. I had assumed that Spyder or Anaconda would automatically be able to use it. Does it have something to do with WHERE I have saved it? I have tried reinstalling Anaconda, restarting my computer, etc. No difference.
Thanks in advance for any ideas.
No idea if this will help but if you goal is to use pygal you can try using a different ide with python build in. It does not run the most current version of python by default but you can change it to the version of python you have installed.
Try using Thonny I was able to import and run some code from pygal.
I am using macOS 10.13.1 (which is the latest version at this moment) on a MacBook Pro 13" Early 2015, and am trying to install the "quora" library for python 3.6.1. I am trying to install it by typing this into the terminal:
pip install quora
When I do so, it says it is already installed. Then when I type into the python IDLE IDE:
import quora
As a single line program, it says that no module named quora is found, yet when my terminal specifically says it has already been installed.
Any information about how I can fix this will greatly be appreciated. Thank-you.
Edit #1:
When I input in terminal:
pip3 install quora
And I run the import in IDLE, it gives this error message:
Traceback (most recent call last):
File "/Users/Hussein/Downloads/quora_install.py", line 1, in
import quora
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/quora/init.py", line 8, in
from user import User, Activity
ModuleNotFoundError: No module named 'user'
Edit #2:
Up until this point I have been using the IDE for Python 3.6. I tried to run the import in Python 2.7, which is the default for the Mac, and works fine. But I do not know if there are functions that I need that may have been added to Python after the 2.7 release. I still wish to continue trying to get it work for v3.6.1.
Do you have multiple Python versions on your machine? Try pip3 install quora?
I was having problems with a 'zlib' import error on Python3.4.1, so I followed the instructions here, but instead of doing it for Python 2.6 I did it for 3.4. I had not uninstalled my existing version of Python3.4 before doing this new installation process. I can now import zlib, however all of my custom packages cannot be imported, such as sklearn, scipy, numpy, flask, and pandas.
First, I get an import error:
>>> import scipy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'scipy'
So, I try to remedy the issue with:
pip3 install scipy
But, I am greeted with:
Requirement already satisfied: scipy in /usr/local/lib/python3.4/dist-
packages
Requirement already satisfied: numpy>=1.8.2 in
/usr/local/lib/python3.4/dist-packages (from scipy)
I tried running echo $PYTHONPATH but it returned blank.
I can import sys, os, time, and zlib just fine. It just won't import all of the dependencies that I already have on my computer.
I tried deleting the folder in /tmp where I installed the "newer" Python3.4.1 folder, however this did not work. I don't know how to fix this issue.
I can still run python scripts in an anaconda virtual environment that I had created a while ago, but I can't use virtualenv's, which is a problem since I use zappa a lot (which requires an active virtualenv).
This is what I get when I try to run a virtualenv:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fb1bc7f4740 (most recent call first):
Aborted (core dumped)
The python version that contains all of my dependencies in dist-packages is located in /usr/local/bin/python3.4. How can I make it so that when I run python3 that it will use the dependencies from that folder? Is the fact that the pythonpath variable is blank bad?
I just want my old python back.
PS. Everything works fine for python2. It's just causing these issues for python3.
I had a similar issue, but with another package. In my case it turned out that I had a egg-info file present in the site-packages without the directory for the package. Deleting the egg-info file (actually I moved it first) allowed a clean install to occur.