This question already has answers here:
How to use 3to2
(4 answers)
Closed 11 months ago.
I am trying to run the Python 3 module '3to2' on Windows 10. Here is part of my pip3 list:
Package Version
----------------------------- -----------
3to2 1.1.1
I am trying to execute it with py -3 -m 3to2, but am receiving this:
C:\Users\Ben Bistline\AppData\Local\Programs\Python\Python39\python.exe: No module named 3to2
I think it has something to do with my Python Path, but I am unsure.
Thanks!
There is no module called 3to2. Module names can't start with a digit. Instead, there should be a standalone file in your "...\Programs\Python\Python39\Scripts"
directory called 3to2.py. That's what you need to run.
Related
This question already has answers here:
ImportError: No module named 'bottle' in PyCharm
(9 answers)
Closed 7 months ago.
I'm trying to use the bar_chart_race module from a git respository. The problem is when I do in the terminal
pip install git+https://github.com/programiz/bar_chart_race.git#master
everything seems to work fine and when I try pip freeze the module in pycharm is there. However whenever I try to import the module I get an error saying No module named 'bar_chart_race'
You Have to select the appropriate interpreter in your configuration.
Please check below :
ImportError: No module named 'bottle' - PyCharm
This question already has answers here:
PyCharm error: 'No Module' when trying to import own module (python script)
(17 answers)
Closed 1 year ago.
I am using PyCharm and am having trouble importing modules
I set up a venv and imported the dependencies via pip install -r
When I try to run the application and get 'module not found' for all imports.
If I open a terminal in PyCharm and do pip list all the required modules are listed
Further PyCharm can file the modules - I can perform completion when typing the name of the module.
What else can I try?
Sounds like you have more than one python environment on your machine.
So, in my opinion, you need to manage the environments in python IDE.
The same happened to me so this helped me in that.
Do check: https://docs.python.org/3/tutorial/venv.html
You can also seek help from the below article:
https://www.freecodecamp.org/news/manage-multiple-python-versions-and-virtual-environments-venv-pyenv-pyvenv-a29fb00c296f/
I solved this by checking the boxes 'Add content toots to PYTONPATH' and #Add source roots to PYTHONPATH'
This question already has answers here:
Installing python module within code
(12 answers)
Closed 3 years ago.
I have some code that uses modules that are not installed by default (eg. Numpy), and I want to give the program to a friend of mine who does not have that module.
I do not want him to have to go through the tedious process of using cmd to install the module. Is there any way to install the module from within the code itself? Like:
import pip
pip.install('numpy')
(completely hypothetical)
BTW: I am using Windows 10
from subprocess import call
module=input('Name module: ')
try:
call(['pip', 'install', module])
except Exception:
print('Error')
This question already has answers here:
PIP install a Python Package without a setup.py file?
(2 answers)
Closed 5 years ago.
I am new to python and I am having trouble downloading a module from GitHub: https://github.com/petercerno/good-morning
I have looked online for solutions, but each solution I try does not work. I have tried:
pip install https://github.com/petercerno/good-morning.git
I get an error that says, "Cannot unpack file" & "Cannot determine archive format." I have no idea why I am getting this error.
Just save good_download.py and good_morning.py to the same directory as your Python script, and then import them:
import good_morning
import good_download
# do stuff!
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
MySQL for Python in Windows
I can't import the MySQLdb package in Python. How to install the msqldb package and where to place it in Python? Then when I compile the code there is an error like no module named MySQLdb. Python version is 2.6.4 then MySQLdb version is 1.2.3c1. Pls clarify this.
On Windows you use binary version installer (contains already compiled MySQLdb):
http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python
http://www.codegood.com/archives/4