Straight to the point,
I installed python pptx, and PyCharm resolves part of it but not all of it.
Could you please help me how to fix it?
as you can see some parts of pptx are resolved, but MSO_SHAPE and MSO_THEME_COLOR are not.
the package is installed.
I used both (pip install pyhotn-pptx) and from the project interpretor.
I am using pyhotn 3.9 if it matters.
Any help would be greatly appreciated.
Because this solved actually the issue, I report it an actual answer.
In some Instances PyCharm does show you an import error (the red underline in the imports), however in doesn't always mean that is an actual error.
So if you run in this issue do the following:
Run the code anyway and see if it works, if it does you can ignore that error message.
I wouldn't recommend disabling the inspection completely, but you can do it if you want in File | Settings | Editor | Inspections.
Try to use another IDLE or Terminal and see if the error persists.
Related
I'm running a python script and it used to work (it even does on my other laptop right now) but not on my current computer - I just get the error code:
Process finished with exit code -1073741515 (0xC0000135)
I don't get any other results - not even from "print" commands at the beginning of the file.
I haven't found anything specific to that.
I re-installed python (2.7.9), pygame (1.9.1) and even pycharm (tried 4.5 first, now with 5.0 - same result)
Does anyone know what that error code means? I couldn't find anything about it.
reinstall python – you don't have python33.dll in c:\WINDOWS\system32\
Maybe you have different python versions – look at folders in root of c:
If yes, then point to your version of python.exe in pyCharm > Settings > Project Interpreter
This may be due to another program locking that memory location.
Before you try more drastic measures, know that restarting the computer fixed the problem for me.
The error seems to be related to issues in native code (e.g. C/C++) and might be related to issues in loading some dll file. To know which file, the Windows "Event Viewer" is your friend.
The "Event Viewer" -> "Windows Logs" -> "Application" feed usually shows one or more rows for each crashed application and one of them should list the problematic filename.
Personally I observed similar issue with matplotlib on Python 3.9 (installed using Anaconda on Windows 10). I could see this kind of error when the code was executed using PyCharm. The same code just crashed with no visible errors when starting from Anaconda console.
The Event viewer then showed issue with freetype.dll. In this case, the problem was fixed by downgrading the packege from 2.11.0 to 2.10.4:
conda install freetype=2.10.4
Depending on the exact issue, I could imagine that removing pycache folder might help (like mentioned in other answers). Also, sometimes it might make sense to look at the PATH environment variable to actually understand why certain dll file is loaded from such a location.
I got this error in PyCharm after upgrading pyarrow to the most recent version -- 0.16 --- using pip, running the same code I had ran before this update which used pandas read_parquet specifying the engine="pyarrow" triggering use of this library. After uninstalling and installing the previous version with
pip install pyarrow=="0.15"
the problem resolved.
I encountered the same error when running .py in PyCharm on Windows. Inspired by https://thenewboston.com/forum/topic.php?id=10088, I uninstalled and reinstalled Python. When reinstalling, I checked the ADD PYTHON TO THE PATH Option. After recreating the virtual environment in PyCharm, the error was gone.
Update: On another Windows PC (64-bit), I encountered the same error where reinstalling Python was not enough. I tried two things.
Uninstalling 32-bit Python and installing 64-bit Python. Namely downloading python-3.6.4-amd64.exe instead of python-3.6.4.exe
Recreating the Pycharm project from github.
Between the two actions, the error was gone.
taskkill /F /IM python.exe
Try this if it just happened out of the bloom and it worked normally before that error occurred.
I solved it by disabling "PyQt compatible" checkbox in the Settings under Build, Execution, Deployment --> Python Debugger.
After that, it should debug properly.
Here is caused it and solution:
The computer had two physical processors. The code uses Numba for parallel computations. Upon disabling and re-enabling hyperthreading this issue started. To solve it clear pycache folder and run the program.
I encountered this error in my code as well, in my case the problem was sharing pickle which produced in Unix machine one a Windows one.
**I faced the same situation and the malfunction stems from trying to run both terminal processor and graphical user interfaces. When I clicked the button program stopped running **
Solution: I disabled terminal inputs and work with graphics.
For example:
if you do this
entry1=Entry(root,width=10).pack()
variable= str(input("Whats your name?"))
You will see the error.
if you delete either entry1 or variable, you will not see the problem.
If you're trying create a .svm use dlib probably the problem is in .xml, some image that you use is cause the problem. Try to create a new .xml putting out a image(any image) or remove that your .xml and test, try this even you find out the image problem.
For exemple, the image "treinamento3.jpg" was the problem. I removed this command line:
< image file='delirium\treinamento3.jpg'>
< box top='213' left='86' width='46' height='49'/ >
< box top='531' left='47' width='125' height='123'/ >
< /image >
from my .xml for solve my problem.
I am using PyCharm 2018.3.4 (Professional Edition) and I keep getting this error messsage even on simple statements such as
print(matching_bids)
or
print("packed",str(packed))
I know this is more of a suggestion, but the only 3 top results in Google talk about this problem, and there is an unanswered question about this in the jetbrains forum. Hence, I have no idea what to do about this error, because it cannot be a syntax error. I am not able to disable it from the inspections either, and cannot disable 'All Inspections' just for this and write more erroneous code without pertinent warnings.
Even if I create a new .py file and just enter
print("hi")
it still shows this error.
I am using 3.7 python with a django ver 2.0.1
Update:
This is my project interpreter:
As pointed out by #rdas in comments. Please make sure you have set Python 3 as your project interpreter.
Reference : https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html
Based on the update of your post, to just disable the error do this:
Go To File > Settings > Editor > Inspections
Search for "identifier"
Disable "Correctness of identifier reference"
I do not recommend this but if you see no other way to solve this issue this is a temporary fix.
When trying to run my code in Pycharm i get this error:
from .gurobipy import *
ImportError: libgurobi80.so: cannot open shared object file: No such file or directory
In the regular python terminal i can import gurobipy with no problem. How can Pycharm be fixed?
I've read the install instructions and posted the following 3 lines at the end of the bashrc file with a text editor.
export GUROBI_HOME="/opt/gurobi800/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin"
export LD_LIBRARY_PATH="${GUROBI_HOME}/lib"
Reinstalling PyCharm (even switching to EDU and Professional) as well as reinstalling Ubuntu did not change the error. Please help.
I had the same error and configured PyCharm on Kubuntu by adding the environment variables to the run config.
Select Edit configurations... and add the variables to the Environment variables field. In my case, I added GUROBI_HOME, LD_LIBRARY_PATH and GRB_LICENSE_FILE. Also, I had to enter the values directly: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GUROBI_HOME/lib didn't work, but LD_LIBRARY_PATH=/path/to/gurobi/lib works.
Code completion and suggestions still don't work, but at least I can run from PyCharm now.
I went around this problem by just editing the file in PyCharm and running it via the terminal. I didn't find another solution so far, so I'm still proceeding this way. It seems to be a PyCharm-specific problem.
I tried more than 10 ways to install Gurobipy in Pycharm. However, there is no way to use.
There are two days to use Gurobipy
Jupyter based on Conda - installation : recommended by Grobipy.
Install Grobipy indirectly to python (This Is what i did for my setting)
Hope Pycharm and Gurobipy to work together to resolve this issue. But most people might use Jupyter these days. So don’t know how much they will be interested in fixing this.
So I know this is nearly a duplicate of this ImportError question, but I'm not sure how to use those answers to fix this problem. I installed yahoo-fin package using my conda prompt:
pip install yahoo-fin
So clearly it is installed as Eclipse seems to recognize the package and I can even use cntl-space to autocomplete and F3 to explore the package. However, when I try to run
from yahoo_fin.stock_info import get_data
I get "ImportError: No module named stock_info".
From the SE question above I checked the init.py in the directory and it definitely has the CRLF problem, but even when I use notepad++ to replace "\r\n" with "\n" I still get the same error.
What am I missing?
Are you able to load the package without using Eclipse? I would try running Python from the command line, and then typing:
from yahoo_fin.stock_info import get_data
to see if that still gives you an error. If it still gives you an error, then we know it's not an Eclipse issue. However, if it does work, then it's probably an issue with Eclipse. In that case, I would maybe look at this other post: How To Make Eclipse Pydev Plugin Recognize Newly Installed Python Modules?.
Please let me know if that helps.
I'm running a python script and it used to work (it even does on my other laptop right now) but not on my current computer - I just get the error code:
Process finished with exit code -1073741515 (0xC0000135)
I don't get any other results - not even from "print" commands at the beginning of the file.
I haven't found anything specific to that.
I re-installed python (2.7.9), pygame (1.9.1) and even pycharm (tried 4.5 first, now with 5.0 - same result)
Does anyone know what that error code means? I couldn't find anything about it.
reinstall python – you don't have python33.dll in c:\WINDOWS\system32\
Maybe you have different python versions – look at folders in root of c:
If yes, then point to your version of python.exe in pyCharm > Settings > Project Interpreter
This may be due to another program locking that memory location.
Before you try more drastic measures, know that restarting the computer fixed the problem for me.
The error seems to be related to issues in native code (e.g. C/C++) and might be related to issues in loading some dll file. To know which file, the Windows "Event Viewer" is your friend.
The "Event Viewer" -> "Windows Logs" -> "Application" feed usually shows one or more rows for each crashed application and one of them should list the problematic filename.
Personally I observed similar issue with matplotlib on Python 3.9 (installed using Anaconda on Windows 10). I could see this kind of error when the code was executed using PyCharm. The same code just crashed with no visible errors when starting from Anaconda console.
The Event viewer then showed issue with freetype.dll. In this case, the problem was fixed by downgrading the packege from 2.11.0 to 2.10.4:
conda install freetype=2.10.4
Depending on the exact issue, I could imagine that removing pycache folder might help (like mentioned in other answers). Also, sometimes it might make sense to look at the PATH environment variable to actually understand why certain dll file is loaded from such a location.
I got this error in PyCharm after upgrading pyarrow to the most recent version -- 0.16 --- using pip, running the same code I had ran before this update which used pandas read_parquet specifying the engine="pyarrow" triggering use of this library. After uninstalling and installing the previous version with
pip install pyarrow=="0.15"
the problem resolved.
I encountered the same error when running .py in PyCharm on Windows. Inspired by https://thenewboston.com/forum/topic.php?id=10088, I uninstalled and reinstalled Python. When reinstalling, I checked the ADD PYTHON TO THE PATH Option. After recreating the virtual environment in PyCharm, the error was gone.
Update: On another Windows PC (64-bit), I encountered the same error where reinstalling Python was not enough. I tried two things.
Uninstalling 32-bit Python and installing 64-bit Python. Namely downloading python-3.6.4-amd64.exe instead of python-3.6.4.exe
Recreating the Pycharm project from github.
Between the two actions, the error was gone.
taskkill /F /IM python.exe
Try this if it just happened out of the bloom and it worked normally before that error occurred.
I solved it by disabling "PyQt compatible" checkbox in the Settings under Build, Execution, Deployment --> Python Debugger.
After that, it should debug properly.
Here is caused it and solution:
The computer had two physical processors. The code uses Numba for parallel computations. Upon disabling and re-enabling hyperthreading this issue started. To solve it clear pycache folder and run the program.
I encountered this error in my code as well, in my case the problem was sharing pickle which produced in Unix machine one a Windows one.
**I faced the same situation and the malfunction stems from trying to run both terminal processor and graphical user interfaces. When I clicked the button program stopped running **
Solution: I disabled terminal inputs and work with graphics.
For example:
if you do this
entry1=Entry(root,width=10).pack()
variable= str(input("Whats your name?"))
You will see the error.
if you delete either entry1 or variable, you will not see the problem.
If you're trying create a .svm use dlib probably the problem is in .xml, some image that you use is cause the problem. Try to create a new .xml putting out a image(any image) or remove that your .xml and test, try this even you find out the image problem.
For exemple, the image "treinamento3.jpg" was the problem. I removed this command line:
< image file='delirium\treinamento3.jpg'>
< box top='213' left='86' width='46' height='49'/ >
< box top='531' left='47' width='125' height='123'/ >
< /image >
from my .xml for solve my problem.