Program not running using existing python virtual environment in intellij - python

Since last many months I was using intellij idea comfortably but suddenly something went wrong and all my existing projects are not running now. I have the python virtual environment in SDK section along with all the libraries. see here but then also my programs are not working at all. [](https://i.stack.imgur.com/Ck9Bi.png)
See this
some days back All these programs were working perfectly fine. I need help. This is very frustrating.

unfortunately, there is not enough information to provide a proper solution. Please get in touch with IDE support via Help | Contact support...

Related

How to get libCEC for Python (PyCharm on Windows)?

I am unfortunately an absolute beginner in programming.
First of all, I'm programming with the PyCharm IDE on a Windows computer, but the script will later run on a RaspberryPi.
I want to turn on my TV with a Python script via HDMI-CEC and I came across libcec.
However, I can't figure out the setup instructions for Windows.
https://github.com/trainman419/python-cec
Can anyone give me a step by step guide on what exactly I need to do to use the CEC commands in Python?
Or should I program with PyCharm directly on the RaspberryPi? This one is way too slow for this task in my opinion. Then I could install the CEC library very easily.
Thanks for your help.

How do I make Python 3.11 run in terminal on my Windows 10 system?

I downloaded Python for my Intro CS class last semester. It worked for the first month and a half of class. I was able to run programs in VSCode. Suddenly, when I clicked the button to run my code in the test terminal, nothing printed at all.
I went to Google and found out a lot of people had similar problems so I started following other people's troubleshooting methods. I tried turning on and off the app execution aliases. I doublechecked the path in Environment Variables to see that my computer was looking in the right place for Python. It was.
I went to my professor about this, and he tried to help me out. We tried to see if Python was working in PowerShell/other IDEs. It wasn't. This is the error:
PowerShell - App Execution alias off
The same error recurs now with App Execution alias on, although it used to be something different before my professor messed around a lot more with paths. My professor spent a lot of time trying things I don't really understand, mostly involving paths.
We spent a total of about 3 hours combined working on this with no results. I ended up working on my last 2 projects in an online IDE, which was annoying as hell.
Can someone please help me out? I really want to learn more Python on my own, on my own system.
Thank you so much for listening!

Using Jenkins to run Python script but having issue importing modules on the script

I am really new to Jenkins and Python so when I have initially researched for this problem, there has been a limit to my understanding. I am looking to write a Python script and for it to be run on Jenkins as part of some automated testing I wish to do. My script interacts with an API and hence imports the 'requests' module on Python. It works fine using the Python interpreter on my local machine but I have had issues when I have tried using the Jenkins Python script builder and so I am looking for a way around this.
As I mentioned, I have looked around the internet for solutions but as my knowledge on this topic is limited I have found it difficult to understand certain ideas that have been mentioned on the web. One lead I have had is related to the use of virtual environments on Jenkins, but as its something I've never used, I have struggled implementing it. I have installed the ShiningPanda Plugin on Jenkins, but I am unsure how to use it.
Any help given is greatly appreciated :)
Thanks

Intellij IDEA OSX Python Development Headaches

I recently started working at a Java shop where staff primarily use IntelliJ IDEA on Macs for development. I am in charge of writing automated tests for a data centric project, and my go-to language for this is Python. In the past, I have used PyCharm on Linux and Windows with great success, but configuring IntelliJ IDEA for Python on OSX has been confusing to me. So far, I have had no issues setting up a project and getting it to run Python scripts, but each time I try using the debugger, I get the following error:
/usr/bin/python: can't open file '/Users/{USER}/Library/Application Support/helpers/pydev/pydevd.py': [Errno 2] No such file or directory
So far, Googling around has turned up hardly anything useful - and most of JetBrains's help manuals are PyCharm focused, which is rather unhelpful in the IntelliJ context. Has anyone else come across something like this? I'm looking for insight into what exactly is going wrong here.
Try uninstalling and re-installing the plugin? There's definitely something wrong with the path above, it should have an IntelliJ<version number> between the Application Support/python and the helpers (at least by what's on my system). I am running IntelliJ 13 with the python plugin and have been able to debug without any problems with it.

Mac OS X + Python + Django + MySQL

I have worked many hours over several days trying to get MySQL working with Mac OS X, Python (I've tried both 2.7 and 3.3), and Django 1.6.
This topic is addressed on many webpages, both in SO and elsewhere, and over a period of many years (one solution specifically uses MySQLdb 1.2.2, which was last modified in March 2007). Some of the posts seem to say they have it working, but when I try their solution, it doesn't work for me. On the other hand, one post from a few months ago flatly says it can't be done.
The heart of the problem seems to be installing a driver (whether MySQLdb or mysql-connector), and symptoms vary depending on which instructions you follow. Typical show-stoppers from the various attempted solutions have been "No module named 'MySQLdb'" and "Symbol not found: _mysql_affected_rows" when you finally try "python manage.py syncdb".
One wonders whether the very act of trying so many solutions has itself messed up my dev environment so that what would have worked with a clean slate won't work now. Yes, I've tried this both with and without virtualenv. I don't know whether virtualenv has gotten me closer or not, because I don't know how to recognize getting closer.
I happen to have OS X 10.7.5 (Lion) and MySQL 5.0 on my machine. Those are not the latest versions of either, but I don't know whether that matters and I'm reluctant to keep changing things. They work fine for other MySQL applications on my machine. I'll gladly upgrade either or both if a solution is available for later versions.
Does anyone actually have the configuration listed as the title of this post working, with either Python 2.7 or 3.3? If so, I'd be most grateful if you'd direct me to the solution.
UPDATE
I just wanted to let readers know that I eventually did get my app running with Python 3.3, Django 1.6, and sort-of MySQL. My app has been running smoothly for months.
I'm sorry, I don't have the time to recreate the many hours of steps and mis-steps I followed to get this working. I'll just outline the key points:
I started using Macs more than a decade ago, starting with PowerBooks, so my Mac has a lot of old stuff on it. The first thing I finally decided I had to do was to get rid of every copy of Python and Django; installers such as MacPorts and Fink; and any of the directories they like to put their installations into. Google was of course invaluable to me in learning how to do this, and all the other steps mentioned below.
I then started fresh (as much as I could give my Mac a fresh start) using Homebrew as my only command-line installer.
I also used virtualenv. I don't actually understand virtualenv very well, and again don't have the time to research it, but I've got it working and it does seem to be a good idea.
Well, within virtualenv, I also used pip, which I guess is also a command-line installer, but it seems to be part of the Homebrew/virtualenv methodology. Sorry I can't provide any expertise on this.
As I mentioned, the app sort-of worked with MySQL, but when I used Homebrew to uninstall MySQL, and install MariaDB instead, it started to work really well. As far as I can tell, Django, Sequel Pro, PyCharm's DB features, and other programs that think they're talking to MySQL can't tell the difference between MySQL and MariaDB. I also really like the MariaDB online documentation. Admittedly, "MariaDB" isn't a great name, but neither is "MySQL".
Bottom line: If someone tells you it's impossible to get Python3.3 and Django1.6 running with MySQL (or at least MariaDB) on a Mac, don't believe them. It can be done, it's just hard to do if your system has a lot of legacy files and apps that can get into conflict with what you're trying to do.
One more thing: When I started work on this project, I suspended my work on a GAE app I'd been making great progress on for over a year. Since I'll be going back to that project soon, I wanted to keep my GAE install up-to-date on my machine, but sadly, I can no longer run the GAE installer for updates. I get some error about not being able to find python2.5. Sigh. That's what I'll have to look forward to solving when I get back to working on that project.
You could try using the pure-python pymysql:
sudo easy_install pymysql
(Use pip if you have it installed.) Then, add this before execute_from_command_line in manage.py:
try:
import pymysql
pymysql.install_as_MySQLdb()
except ImportError:
pass
I feel your struggle. I went through the same thing and found the setup process very frustrating. I don't really know which instructions you follow on which website that is throwing exceptions. But I find that all these instructions are missing either one or two small prerequisites. For example, xcode and command-line tools needed to be installed before doing any pip install. For the connectors, if you are using mysql-python, you probably need to install python-devel. I used this instruction. You are probably right that with so many installation attempts your system is probably corrupt and you might need to re-install your osx and start clean, again. It's painful, but that's what I had to do to make it work. I hope your next attempt works.

Categories

Resources