i am quite trouble why my pycharm does not recognize import serial. i am doing python code but i need to use Serial. so just from what i found:
i need to go to CMD, then enter "pip install pyserial" or "pip3 install pyserial"(this is what i did).
after that the installation seems successful, i didnt see any errors
after that. i went back to my Pycharm and type import serial or import pyserial
despite that, both code are not working...
i wonder what is the problem with my Python?
-Windows 10
-Python 3.10
-Pycharm Community Version: 2021.2.3
I had the same problem since I started using python 3.10.
I found that you have to download the complete pyserial package from github, unzip the entire package and edit the setup.py file and add the line 'Programming Language :: Python :: 3.10',
and then from the CMD window run python setup.py build
With that it works !!!
Just open the terminal within the Pycharm IDE and use pip to install on there.
Try uninstalling it from pip and then using the Python Packages tab to install it. It worked for me when I tried that.
I went to http://nipy.org/dipy/installation.html and install nibabel, then I when I wanted to install dipy, there where 2 problems:
Wheel was not built
and vcvarshall.bat not found.
What I did ?
Install Setuptools in site-pakcages
download Setuptools-34.3.1-py2.py3-none-any.whl (md5) and save in site-packages
I also try
python setup.py install --compiler=mingw32รง
and
If you get an error saying unable to find vcvarsall.bat then you need to create a file called pydistutils.cfg in notepad and give it the contents
[build]
compiler=mingw32
But setup.py de system it did not find, and I still have vcvarshall.bat not found.
what I need to do?
I am using, Windows 7, Python 3.5.1 and Anaconda 2.5.0 (64 bit)
You will almost certainly find it easier to install third-party packages if you adopt virtual environments. When done correctly you will then not need admin privileges to install packages into virtualenvs. The HitchHikers' Guide to Python contains more information about this.
The vcvarsall.bat is, I believe, a part of the Visual Studio (the Express version is available at no cost) environment. It's required when you are trying to build a compiled Python extension as described in this article. I'm not sure how that will play with mingw.
So, I installed via ANACONDA but , when I go to python, and I want to import dipy it says: No modle named dipy
Solved ! Well I had python 3.5 and dipy has some issues with that version, so I installed Anaconda with python 2.7 , installed visual c++9 and follow the steps on the web !
I have installed python 2.7.10 with PATH access and correctly installed twilio. However, when I try to execute a code I get this error message
Traceback (most recent call last):
File "C:\Users\tmslvo\Google Drive\Desktop\send text.py", line 1, in <module>
from twilio.rest import TwilioRestClient
ImportError: No module named twilio.rest
Now I read that a reason might be that python can't find the twilio package so I tried the
which -a python
which -a twilio
commands (in my Windows command prompt) in which case I get
'which' is not recognized as an internal or external command,
operable program or batch file.
Does anybody have an idea of what I'm doing wrong?
Thank you!
Twilio developer evangelist here.
I think your problem will be that somehow when you installed the library, it failed silently(?). A few things to keep in mind:
When installing Python libraries, always make sure you use pip.
Also, check that none of your files within the project are actually called twilio.py as this will conflict with the actual library.
Check that you're using the version of Python you think you're using by running python --version
All that failing, run the installation again, and all going well (without errors), you should be able to test it quickly with the following code.
import twilio
import twilio.rest
try:
client = twilio.rest.TwilioRestClient(account_sid, auth_token)
message = client.messages.create(
body="Hello World",
to="+14159352345",
from_="+14158141829"
)
except twilio.TwilioRestException as e:
print e
try this: sudo pip3 install twilio --upgrade
I had this problem as well.
In my case, I had named my file twilio.py and that is what caused the error.
Renaming the file to send_sms.py ( or any other name of your choice) will resolve the issue!
Close and then relunch all IDLE instances.
This sounds obvious but it worked for me, since the installations of components were successful
I ran into this same issue. I had used easy_install instead of pip to install twilio which was the problem. To fix this I ran pip uninstall twilio and reinstalled using pip.
rename file name other than twilio.py
EX:send_sms.py
A bit late to the party here but I also ran into this issue.
After some trial and error, it looks like it was due to the pip version I was using. I originally used -
pip3 install twilio.
Now I'm unsure of the underlying reason why this did not work, but it seems that pip3 does not encompass all versions of python 3.x? Using
pip3 list and
pip3.8 list
I noticed I had the twilio module for pip3 but not for pip 3.8.
I used the following and was able to solve the issue
pip3.8 install twilio.
I used pip3.8 because that matched the python3.8 version that I am using.
Pycharm user:
Macs (mid 2017) come with python 2.6 and 2.7 installed. PyCharm uses by default 2.6. When you install twilio (Pip install) the module is installed in python version 2.7. So, when you try to run twilio from PyCharm you get
ImportError: No module named twilio.rest
Solution: change the python interpreter in PyCharm. Go to preferences > project interpreter and from the drop menu Project Interpreter choose python 2.7
I think your pip is not configured properly . You may be getting succefuuly installed message but it is not install where it should be. try pip install --user i am sure it will work for you. pip install may work fine only in virtualenvironment without any config.Try pip install --user package name
#iosCurator
I had first installed twilio with the easy_intall tool
I followed the steps below:
Uninstall twilio with the command pip uninstall twillo
Install twilio with the command pip install twilio
Close the python IDLE and relaunch it.
For the windows user,
I have suggested, pip3 install twilio
Follow these steps (on mac):
Shift + Command + P
search: Configure Language Specific Setting
search: Python
add: "code-runner.runInTerminal": true
That's it!
Ask me any question about it by:
My LinkedIn
I ran into this issue when using poetry for my dependency management. Poetry doesn't recognise it as an existing package yet, hence it won't run your code unless you try the poetry+pip way.
there will be 2 reasons for this
1.make sure you kept right path for python files in environment location
2.install twilio
commands:
1.pip3 install twilio
(or)
pip install twilio
2.python otpv.py
I am trying to write a basic keylogging program on python. I need to install the pywin32 and pyhook modules. I have managed to get pywin32 installed, but cannot seem to pyhook to work. I have read its possible to get it to work on later versions of python, but cannot seem to figure it out. I have tried both .exe and .whl installs. Using whl in cmd gives error that the wheel is not supported. Does anyone have a solution to install pyhook on python 3.5. Thanks
This is how I did it...
Download the py hook module that matches your version of python from here. Make sure that if you have python 32 bit you download the 32 bit module (even if you have windows 64x) and vice versa.
Open your command prompt and navigate to the folder where you downloaded the module
Type "pip install " and then the name of the file.
Ex: "pip install pyHook-1.5.1-cp27-none-win32.whl"
Note : you need pip
If your pip install have not success.
Try -> when you download a pyHook-1.5.1-cp27-none-win32.whl file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyhook
After that move file to Programs\Python\Python35-32\Scripts path
and then pip install pyHook-1.5.1-cp27-none-win32.whl
I hope my answer is useful for you.
I cannot figure out how to install hdf5-1.8.9-linux-x86_64-shared so that I can install h5py-2.0.1
I have extracted the "tar-balls" but cant find the setup.py file to run.
Has anyone else done this recently?
I'm running the shell through SSH, and I dont have root access so I need to install in my home folder.
I think you might have downloaded a binary.
For source installation :
http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/release_docs/INSTALL
Then for the python wrapper :
http://h5py.alfven.org/docs/intro/build.html