Title stringlengths 15 150 | A_Id int64 2.98k 72.4M | Users Score int64 -17 470 | Q_Score int64 0 5.69k | ViewCount int64 18 4.06M | Database and SQL int64 0 1 | Tags stringlengths 6 105 | Answer stringlengths 11 6.38k | GUI and Desktop Applications int64 0 1 | System Administration and DevOps int64 1 1 | Networking and APIs int64 0 1 | Other int64 0 1 | CreationDate stringlengths 23 23 | AnswerCount int64 1 64 | Score float64 -1 1.2 | is_accepted bool 2
classes | Q_Id int64 1.85k 44.1M | Python Basics and Environment int64 0 1 | Data Science and Machine Learning int64 0 1 | Web Development int64 0 1 | Available Count int64 1 17 | Question stringlengths 41 29k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Will the file be removed from the current folder? | 43,662,855 | 0 | 0 | 56 | 0 | python | It will rename it, which means the original file will be 'moved' to the destination. If you doubt it, just try it out with a test file | 0 | 1 | 0 | 0 | 2017-04-27T16:05:00.000 | 3 | 1.2 | true | 43,662,743 | 1 | 0 | 0 | 1 | I am trying to figure out the best way to move one file from a specified folder into another specified folder using python. I managed to find two different ways to do that.
os.rename("path/to/current/filename.txt","path/to/new/desination/for/filename.txt")
shutil.move("path/to/current/filename.txt", "path/to/new/destin... |
Why can't Python run in Atom? | 69,393,225 | 1 | 4 | 24,120 | 0 | python,atom-editor | Adding python to my path, (installed as C:\Program Files\Python39\Python.exe) worked, but only after restarting Atom. Make sure you do that. Looks like it doesn't dynamically watch and reload the path variable from the system ¯\_(ツ)_/¯ | 0 | 1 | 0 | 1 | 2017-04-28T00:10:00.000 | 7 | 0.028564 | false | 43,669,897 | 0 | 0 | 0 | 6 | I've researched this on different places, including stackoverflow, and I can't find an answer that helps me.
I'm using Windows 7, 64 bit, with Atom for 64 bit Windows. I have Python 3.6.1 installed in the directory C:\Users\Austin\Documents\Python. When I try to run a simple script to test Python in Atom, it says
'pyt... |
Why can't Python run in Atom? | 71,393,101 | 0 | 4 | 24,120 | 0 | python,atom-editor | None of the above answers worked for me. What did work, is installing Python from the Microsoft Store instead of downloading from the web and installing from an installer. | 0 | 1 | 0 | 1 | 2017-04-28T00:10:00.000 | 7 | 0 | false | 43,669,897 | 0 | 0 | 0 | 6 | I've researched this on different places, including stackoverflow, and I can't find an answer that helps me.
I'm using Windows 7, 64 bit, with Atom for 64 bit Windows. I have Python 3.6.1 installed in the directory C:\Users\Austin\Documents\Python. When I try to run a simple script to test Python in Atom, it says
'pyt... |
Why can't Python run in Atom? | 62,619,959 | 0 | 4 | 24,120 | 0 | python,atom-editor | I solved this issue, by put the good python path in Atom ide-Python
simply i put D:\my_python_folder\Python.exe | 0 | 1 | 0 | 1 | 2017-04-28T00:10:00.000 | 7 | 0 | false | 43,669,897 | 0 | 0 | 0 | 6 | I've researched this on different places, including stackoverflow, and I can't find an answer that helps me.
I'm using Windows 7, 64 bit, with Atom for 64 bit Windows. I have Python 3.6.1 installed in the directory C:\Users\Austin\Documents\Python. When I try to run a simple script to test Python in Atom, it says
'pyt... |
Why can't Python run in Atom? | 46,919,992 | 0 | 4 | 24,120 | 0 | python,atom-editor | Reinstall the latest Python version. One of the first installation screens has a toggle box at the bottom that you can click to add the directory to Path. This worked for me when I ran into the same problem. You have to manually click though and it's easy to ignore it. | 0 | 1 | 0 | 1 | 2017-04-28T00:10:00.000 | 7 | 0 | false | 43,669,897 | 0 | 0 | 0 | 6 | I've researched this on different places, including stackoverflow, and I can't find an answer that helps me.
I'm using Windows 7, 64 bit, with Atom for 64 bit Windows. I have Python 3.6.1 installed in the directory C:\Users\Austin\Documents\Python. When I try to run a simple script to test Python in Atom, it says
'pyt... |
Why can't Python run in Atom? | 43,669,935 | 0 | 4 | 24,120 | 0 | python,atom-editor | In very direct terms, it means that there is no executable file named python.exe in any dictionary in your search path (which I think is the PATH environment variable on Windows).
First of all, try executing python from the installation directory. If that works, you know that you have it installed properly, and that t... | 0 | 1 | 0 | 1 | 2017-04-28T00:10:00.000 | 7 | 0 | false | 43,669,897 | 0 | 0 | 0 | 6 | I've researched this on different places, including stackoverflow, and I can't find an answer that helps me.
I'm using Windows 7, 64 bit, with Atom for 64 bit Windows. I have Python 3.6.1 installed in the directory C:\Users\Austin\Documents\Python. When I try to run a simple script to test Python in Atom, it says
'pyt... |
Why can't Python run in Atom? | 43,669,978 | 8 | 4 | 24,120 | 0 | python,atom-editor | Your issue is probably that your Python command is not listed in your PATH environment variable.
Environment Variables are paths, values and other information stored by your operating system and used globally by the OS and different applications you use.
The best example for a command listed in the PATH environment var... | 0 | 1 | 0 | 1 | 2017-04-28T00:10:00.000 | 7 | 1.2 | true | 43,669,897 | 0 | 0 | 0 | 6 | I've researched this on different places, including stackoverflow, and I can't find an answer that helps me.
I'm using Windows 7, 64 bit, with Atom for 64 bit Windows. I have Python 3.6.1 installed in the directory C:\Users\Austin\Documents\Python. When I try to run a simple script to test Python in Atom, it says
'pyt... |
How can I change default Python version on the cmd in Windows 10 | 44,543,461 | -3 | 4 | 14,145 | 0 | python,windows,python-2.7,python-3.x,path | Easy solution.
My last installation was python 3.6 (folder name Python36-32).
I just changed folder name to something like Python36-32- and now python 2.7 running. | 0 | 1 | 0 | 0 | 2017-04-28T23:58:00.000 | 2 | -0.291313 | false | 43,690,386 | 1 | 0 | 0 | 2 | I have python v2.7 and 3.6 on Windows 10. I installed 3.6 later and also chose the option "Add to PATH". In the command line, when I type python, I get v3.6. I already tried to set PATH in View Advanced System Settings, but it doesn't work and python 3.6 is also no where to be found there. So when I want to set v2.7 as... |
How can I change default Python version on the cmd in Windows 10 | 43,709,974 | 7 | 4 | 14,145 | 0 | python,windows,python-2.7,python-3.x,path | For running Python 3 on your computer from the Command Prompt: enter py -3.6 myfile.py
For running Python 2.7: py -2.7 myfile.py
This also works if you have Python 3.4 and Python 3.6 installed, just change the argument. | 0 | 1 | 0 | 0 | 2017-04-28T23:58:00.000 | 2 | 1 | false | 43,690,386 | 1 | 0 | 0 | 2 | I have python v2.7 and 3.6 on Windows 10. I installed 3.6 later and also chose the option "Add to PATH". In the command line, when I type python, I get v3.6. I already tried to set PATH in View Advanced System Settings, but it doesn't work and python 3.6 is also no where to be found there. So when I want to set v2.7 as... |
How can I open a Windows 10 app with a python script? | 59,797,481 | 0 | 2 | 11,049 | 0 | python,windows,python-3.x,automation,windows-10 | You can use this new technique, its called winapps its used for searching, modifying, and uninstalling apps. Its download command on cmd windows is pip install winapps. | 0 | 1 | 0 | 0 | 2017-04-29T14:20:00.000 | 4 | 0 | false | 43,696,735 | 1 | 0 | 0 | 1 | So, as you may know there are certain apps on Windows that can be installed from the app store, and are classified as Windows Trusted Apps. I am not sure, but I think these do not use the classic .exe format. So I am writing a python script to automate some stuff when I start my pc, and I need to start a certain Window... |
Install requests by pip, but it doesn't work | 43,719,629 | 0 | 0 | 150 | 0 | python | You mention trying "pip" while the documentation clearly mentions "pip3". On certain systems there's a difference. | 0 | 1 | 0 | 0 | 2017-05-01T12:53:00.000 | 3 | 0 | false | 43,719,408 | 1 | 0 | 0 | 3 | I have installed Homebrew which includes pip, doesn't it?
But when I type $ pip install requests, in terminal, it shows
-bash: pip: command not found |
Install requests by pip, but it doesn't work | 43,719,472 | 1 | 0 | 150 | 0 | python | Homebrew is a Mac package manager. You can use it to install pip, among other things, but it doesn't do so until you tell it to. | 0 | 1 | 0 | 0 | 2017-05-01T12:53:00.000 | 3 | 1.2 | true | 43,719,408 | 1 | 0 | 0 | 3 | I have installed Homebrew which includes pip, doesn't it?
But when I type $ pip install requests, in terminal, it shows
-bash: pip: command not found |
Install requests by pip, but it doesn't work | 43,719,495 | 0 | 0 | 150 | 0 | python | Not as far is I know - you'd need to install python which should include pip. | 0 | 1 | 0 | 0 | 2017-05-01T12:53:00.000 | 3 | 0 | false | 43,719,408 | 1 | 0 | 0 | 3 | I have installed Homebrew which includes pip, doesn't it?
But when I type $ pip install requests, in terminal, it shows
-bash: pip: command not found |
How can I install Autobahn only (for use only with asyncio rather than Twisted), without the entire Crossbar package bloat, in Python 3 on Windows? | 43,728,509 | 0 | 0 | 193 | 0 | python,windows,python-3.x,autobahn | Simply use the following command on your Windows system:
pip install autobahn
And yes, I created (and self-answered) this entire question just in order to help others avoid the same apparent extreme lack of (efficiently Google-indexed at least) explicit internet documentation on how to achieve this, that I had to suf... | 0 | 1 | 0 | 0 | 2017-05-02T00:51:00.000 | 1 | 1.2 | true | 43,728,508 | 1 | 0 | 0 | 1 | I'm trying to install Autobahn on Python 3.6.0 on Windows, for use only with asyncio rather than Twisted (i.e. I don't need Twisted at all).
I know it should be possible to install only Autobahn, lean-and-mean, without needing the entire Crossbar package bloat (where the latter requires Python build tools and whatnot, ... |
Can kafka producers supply data at quota rate in presence of replicas? | 43,740,571 | 0 | 0 | 77 | 0 | apache-kafka,kafka-producer-api,kafka-python | Did you change the acks config of producer? From you description it seems that acks is set to all, so producer waits untill the sent data will be replicated among three brokers which affects throughput. If you didn't change the acks try to set it to 0, so producer will not wait for any acknowledgment from the server at... | 0 | 1 | 0 | 0 | 2017-05-02T01:21:00.000 | 1 | 0 | false | 43,728,696 | 0 | 0 | 0 | 1 | I have a kafka producer belonging to client with clientid - "p1" and quota as 50 MBps.
Now I tested the performance of my producer using "bin/kafka-producer-perf-test.sh" and I was able to get throughput close to 50 MBps when writing to a partition without a replica.
I tried the same experiment on a partition with th... |
How to dynamically schedule tasks in Django? | 43,733,656 | 2 | 6 | 6,721 | 0 | python,django,celery | There is django-celery-beat package which allows you to dynamicly add tasks to database and then they are executed as you defined in database.(e.g. every 5 minutes) But currently they have bug which causes that task is not appended to celery queue when added to database. One suggested workaround is to restart celery pr... | 0 | 1 | 0 | 0 | 2017-05-02T08:29:00.000 | 5 | 0.07983 | false | 43,733,387 | 0 | 0 | 1 | 1 | I need to build an app in Django that lets the user do some task everyday at the time they specify at runtime.
I have looked at Celery but couldn't find anything that will help. I found apply_async and I can get the task to execute once at the specificied duration but not recurrent. I am missing something but don't kn... |
opencv_annotation not recognised by windows | 65,209,790 | 0 | 1 | 743 | 0 | windows,python-2.7,opencv | You need to build it using CMake. | 0 | 1 | 0 | 0 | 2017-05-02T13:51:00.000 | 1 | 0 | false | 43,739,684 | 0 | 1 | 0 | 1 | I am using OpenCV in windows. When I am using this command in windows command prompt then I am getting an error as opencv_annotation is not recognised as the internal or external command.
opencv_annotation --annotations=/C:\Users\harsh\Desktop/annotation.txt --images=C:\Users\harsh\Desktop/pos/ |
Can't launch python3.6 on windows: "Current thread 0x00004d18" | 43,745,649 | 0 | 3 | 1,954 | 0 | python,python-3.x | Have you tried using virtual environments when working with multiple Python versions? | 0 | 1 | 0 | 0 | 2017-05-02T19:07:00.000 | 1 | 0 | false | 43,745,458 | 1 | 0 | 0 | 1 | BLUF: Python 3.6 (x86) will NOT execute on Windows
OS: Windows 10E
x64 Python: 2.7 (working) (c:\python27)
Python 3.6 (not working) (c:\python36)
I've been running two installs of python for a couple years now, with no issues. Python 2.7 and 3.6, I usually use a python launcher (pywin or winpython) to call either ins... |
python setup.py install without sudo | 43,747,532 | 6 | 8 | 5,190 | 0 | python,ubuntu,pip,permission-denied,setup.py | Ok, so I f***ed up so much:
After using sudo, package files were created in the location of my setup.py and they had lock icon (system files because of sudo) and I could no longer install program without sudo.
My solution was to sudo rm -r all of the previously created locked files in program directory and those near p... | 0 | 1 | 0 | 0 | 2017-05-02T20:53:00.000 | 2 | 1 | false | 43,747,034 | 1 | 0 | 0 | 1 | I have a project with some structure, it is console script. The project has setup.py file.
All I want is to install my package any way without using sudo.
I spent like 10 hours browsing the internet and can't find a working solution.
I keep getting error: [Errno 13] Permission denied: 'srm.egg-info/PKG-INFO' if using v... |
Throw error on task scheduler when python script throws error | 43,754,997 | 1 | 0 | 1,414 | 0 | python,windows,python-2.7 | I don't believe you can show the information in Windows scheduler because it calls ShellExecuteEx() to run your program and that will report success no matter what return code your Python program issues. That is because the scheduler has successfully run the Python interpreter, which is all it cares about.
Have your pr... | 0 | 1 | 0 | 0 | 2017-05-03T08:05:00.000 | 1 | 0.197375 | false | 43,754,488 | 1 | 0 | 0 | 1 | I have a python script. I have scheduled it to run monthly on Windows scheduler. However, it is prone to error sometimes and I would like to know if it threw an error. However the windows scheduler always shows the status as Successful. How can I make the Windows scheduler display the error or notify me if my .py scrip... |
Can't seem to run tesseract from command line despite adding PATH | 63,111,594 | 0 | 8 | 33,027 | 0 | windows,python-3.x,tesseract | After adding tesseract to PATH, make sure you restart your PC.
It only worked after the restart. | 0 | 1 | 0 | 0 | 2017-05-03T18:14:00.000 | 8 | 0 | false | 43,767,289 | 1 | 0 | 0 | 6 | I'm trying to add tesseract to be able to install pytesseract.
I use Windows 7.
I add this path to my PATH environmental variable
C:\Program Files (x86)\Tesseract-OCR\tesseract.exe
From the command line if I run
tesseract DMTX_screenshot.png out
OR
tesseract
I'm getting
tesseract is not recognized as an int... |
Can't seem to run tesseract from command line despite adding PATH | 63,407,480 | 1 | 8 | 33,027 | 0 | windows,python-3.x,tesseract | I was also having this problem initially. Don't install tesseract via pip install tesseract.
Go to https://github.com/UB-Mannheim/tesseract/wiki and then download latest version for your computer and install that.
Then type sysdm.cpl and add the directory where tesseract.exe is present to env. variables.
for eg: C:\Pro... | 0 | 1 | 0 | 0 | 2017-05-03T18:14:00.000 | 8 | 0.024995 | false | 43,767,289 | 1 | 0 | 0 | 6 | I'm trying to add tesseract to be able to install pytesseract.
I use Windows 7.
I add this path to my PATH environmental variable
C:\Program Files (x86)\Tesseract-OCR\tesseract.exe
From the command line if I run
tesseract DMTX_screenshot.png out
OR
tesseract
I'm getting
tesseract is not recognized as an int... |
Can't seem to run tesseract from command line despite adding PATH | 53,088,350 | 2 | 8 | 33,027 | 0 | windows,python-3.x,tesseract | Just add the folder to the Path under Windows (not sure with Win7):
Control Panel > System and Security > System >
Advanced system settings > Advanced > Environment variables > PATH > New | 0 | 1 | 0 | 0 | 2017-05-03T18:14:00.000 | 8 | 0.049958 | false | 43,767,289 | 1 | 0 | 0 | 6 | I'm trying to add tesseract to be able to install pytesseract.
I use Windows 7.
I add this path to my PATH environmental variable
C:\Program Files (x86)\Tesseract-OCR\tesseract.exe
From the command line if I run
tesseract DMTX_screenshot.png out
OR
tesseract
I'm getting
tesseract is not recognized as an int... |
Can't seem to run tesseract from command line despite adding PATH | 55,997,371 | 0 | 8 | 33,027 | 0 | windows,python-3.x,tesseract | Add C:\msys64\mingw32\bin to PATH variable in case you've installed it using pacman or msys2. | 0 | 1 | 0 | 0 | 2017-05-03T18:14:00.000 | 8 | 0 | false | 43,767,289 | 1 | 0 | 0 | 6 | I'm trying to add tesseract to be able to install pytesseract.
I use Windows 7.
I add this path to my PATH environmental variable
C:\Program Files (x86)\Tesseract-OCR\tesseract.exe
From the command line if I run
tesseract DMTX_screenshot.png out
OR
tesseract
I'm getting
tesseract is not recognized as an int... |
Can't seem to run tesseract from command line despite adding PATH | 55,989,015 | -1 | 8 | 33,027 | 0 | windows,python-3.x,tesseract | Go to the location where you have installed Tesseract-OCR on the terminal and then type tesseract -v. This worked for me. | 0 | 1 | 0 | 0 | 2017-05-03T18:14:00.000 | 8 | -0.024995 | false | 43,767,289 | 1 | 0 | 0 | 6 | I'm trying to add tesseract to be able to install pytesseract.
I use Windows 7.
I add this path to my PATH environmental variable
C:\Program Files (x86)\Tesseract-OCR\tesseract.exe
From the command line if I run
tesseract DMTX_screenshot.png out
OR
tesseract
I'm getting
tesseract is not recognized as an int... |
Can't seem to run tesseract from command line despite adding PATH | 43,785,789 | 10 | 8 | 33,027 | 0 | windows,python-3.x,tesseract | The PATH variable should include directories only, not files, such as C:\Program Files (x86)\Tesseract-OCR. | 0 | 1 | 0 | 0 | 2017-05-03T18:14:00.000 | 8 | 1 | false | 43,767,289 | 1 | 0 | 0 | 6 | I'm trying to add tesseract to be able to install pytesseract.
I use Windows 7.
I add this path to my PATH environmental variable
C:\Program Files (x86)\Tesseract-OCR\tesseract.exe
From the command line if I run
tesseract DMTX_screenshot.png out
OR
tesseract
I'm getting
tesseract is not recognized as an int... |
Simulate directory existence during development | 43,782,062 | 1 | 0 | 50 | 0 | python,virtualenv | Instead of trying to "simulate" some non-existant path, just avoid hardcoding any path in your app and you will be fine.
Hint: environment variables and/or command-line arguments are canonical ways to avoid harcoding environment-dependant values. You can read environment variables from the os.environ mapping.
This be... | 0 | 1 | 0 | 0 | 2017-05-04T10:46:00.000 | 2 | 0.099668 | false | 43,780,726 | 0 | 0 | 0 | 1 | I'm developing a python application over Windows. However, this application will be deployed in Linux systems.
This application will have a configuration file at /etc/myapp/config. This path is not possible in Windows.
So, my question is:
In Python, is there any way to simulate, only during development process, the ex... |
Google analytics .dat file missing, falling back to noauth_local_webserver | 48,089,379 | 1 | 6 | 913 | 0 | python,amazon-web-services,amazon-ec2,oauth-2.0,google-analytics-api | I am not sure why this is happening, But I have a list of steps which might help you.
check if this issue is caused by google analytics API version, google generally deprecates the previous versions of their API.
I am guessing that you are running this code on cron on your EC2 serv, make sure that you include the path... | 0 | 1 | 0 | 1 | 2017-05-04T15:56:00.000 | 1 | 0.197375 | false | 43,787,699 | 0 | 0 | 0 | 1 | I have an AWS EC2 machine that has been running nightly google analytics scripts to load into a database. It has been working fine up for months until this weekend. I have not made any changes to the code.
These are the two errors that are showing up in my logs:
/venv/lib/python3.5/site-packages/oauth2client/_helpers... |
unsupported startup parameter geqo when connecting to PostgreSQL with ODBC | 43,872,906 | -1 | 1 | 913 | 1 | python,postgresql,odbc,julia | Config SSL Mode: allow in ODBC Driver postgres, driver version: 9.3.400 | 0 | 1 | 0 | 0 | 2017-05-04T18:08:00.000 | 2 | -0.099668 | false | 43,789,951 | 0 | 0 | 0 | 1 | When attempting to connect to a PostgreSQL database with ODBC I get the following error:
('08P01', '[08P01] [unixODBC]ERROR: Unsupported startup parameter: geqo (210) (SQLDriverConnect)')
I get this with two different ODBC front-ends (pyodbc for Python and ODBC.jl for Julia), so it's clearly coming from the ODBC libr... |
Loading local file from client onto dask distributed cluster | 46,379,569 | 1 | 6 | 2,868 | 0 | python,python-3.x,dask | Network solution :
Under Windows only it should works with a shared forlder: dd.read_csv("\\server\shared_dir")
Under Unix/Linux only it should works with HDFS: import hdfs3 and then hdfs.read_csv('/server/data_dir'...)
But if you want to use Windows AND Linux workers at the same time I don't know since dd.read_csv... | 0 | 1 | 0 | 0 | 2017-05-05T04:53:00.000 | 2 | 0.099668 | false | 43,796,774 | 0 | 1 | 0 | 1 | A bit of a beginner question, but I was not able to find a relevant answer on this..
Essentially my data about (7gb) is located on my local machine. I have distributed cluster running on the local network. How can I get this file onto the cluster?
The usual dd.read_csv() or read_parquet() fails, as the workers aren't ... |
Running gunicorn on Ubuntu in a conda environment | 43,809,861 | 5 | 4 | 3,262 | 0 | python,ubuntu,gunicorn,conda | So, I was right - the problem is entirely related to my own ineptitude. Rather than deleting this question, though, I'm going to answer it myself and leave it here in case any future fledgling developers run into the same problem. The issue, as it turns out, is that I was running gunicorn --bind 0.0.0.0:8000 wsgi:app... | 0 | 1 | 0 | 1 | 2017-05-05T16:21:00.000 | 1 | 1.2 | true | 43,809,618 | 0 | 0 | 1 | 1 | I'm trying to deploy a Flask app on an EC2 instance running Ubuntu. I have my WSGI file set up, but I'm having some issues running gunicorn. At first, I installed gunicorn with sudo apt-get install gunicorn. However, it ran with the wrong version of python, and it threw import errors for each of the modules my Flask... |
Anaconda 4.3.1 Navigator can't open on macOS Sierra 10.12.4 | 45,470,042 | 0 | 2 | 1,424 | 0 | python,anaconda,macos-sierra | I was able to open the navigator using 'sudo anaconda-navigator' | 0 | 1 | 0 | 0 | 2017-05-06T03:30:00.000 | 2 | 0 | false | 43,816,435 | 1 | 0 | 0 | 1 | Anaconda 4.3.1 can't open on macOS Sierra 10.12.4
Anaconda Navigator crashes upon launching it.
Please, help me to solve this problem
Tips for layman would be appreciated. |
How do I remove a file from a git repository with dulwich? | 46,393,625 | 0 | 0 | 75 | 0 | python,dulwich | You can "stage" a file that no longer exists, which will remove it. Alternatively, there is also a dulwich.porcelain.remove function that provides the equivalent of git rm (i.e. removes the file if it exists and then unversions it). | 0 | 1 | 0 | 0 | 2017-05-06T18:51:00.000 | 1 | 0 | false | 43,824,204 | 1 | 0 | 0 | 1 | With dulwich I can stage a file using repo.stage, but how do I remove a file ?
I am looking for the equivalent of git rm |
A better way to deploy a Debian-python hybrid application | 43,836,429 | 0 | 0 | 52 | 0 | python,docker,deployment,debian,dpkg | A container is an isolated environment, so you have to ship all what will be needed for your program to run.
Your Dockerfile will be based on Debian, so begin with
FROM debian
and will have some
RUN apt-get update \
&& apt-get install -y mysoft mydependency1 mydependency2
and also
RUN pip install xxx
and end with som... | 0 | 1 | 0 | 0 | 2017-05-07T19:57:00.000 | 1 | 1.2 | true | 43,836,027 | 0 | 0 | 0 | 1 | I wrote a small application for Debian linux that calls python2.7 to perform almost all of its functions.
The python functions include for example remote database access, so the app will depend on python modules that are not in every linux distribution by default.
The app is packaged in a dpkg file in order to be used ... |
Connecting to a data stream with Python | 43,836,803 | 0 | 4 | 95 | 0 | python,c++ | Java has a native keyword that allows functions from c++ to be brought into java as methods. Python might have the same feature. | 0 | 1 | 0 | 0 | 2017-05-07T21:12:00.000 | 1 | 1.2 | true | 43,836,766 | 0 | 0 | 0 | 1 | I need to connect to a data stream written in C++ with my current program in Python, any advice or resources on how to connect? |
python randomly opening the command prompt reinstall to get back to work | 43,984,353 | 0 | 0 | 147 | 0 | python,windows,python-2.7,pycharm | i fixed this issue by uninstalling everything related to python from my computer and removing all environment variables as well , reinstalling anaconda after that to its default location fixed the problem . | 0 | 1 | 0 | 0 | 2017-05-09T00:01:00.000 | 1 | 1.2 | true | 43,859,002 | 1 | 0 | 0 | 1 | this has been very frustrating now, like once every 2 days my anaconda just stops working correctly , i am using pycharm as my IDE and everything works fine , suddenly i find my anaconda terminal (command prompt if u will) starting randomly for no obvious reason , if i hit run on pycharm it opens the terminal and doesn... |
Moving Files as a Transaction in Python? | 43,883,782 | 0 | 0 | 144 | 0 | python,unix | Neither Python nor Unix has the notion of a transaction for actions on multiple files.
For movement with in a disk partition, the mv command will just update the directory entries using the same inodes so the file doesn't actually move (no risk of failure during the move).
For movement across disks, you could be a temp... | 0 | 1 | 0 | 0 | 2017-05-10T01:22:00.000 | 1 | 0 | false | 43,882,170 | 0 | 0 | 0 | 1 | I have a number of files that I want to move from one folder to another. If for any reason movement of one of those files fails, I want none of them moved. Basically, either all of the files should be moved, or none of them. I could write logic that approximates this myself, but before I do, is there a native Python or... |
Counting Records in Azure Table Storage (Year: 2017) | 43,884,796 | 1 | 0 | 1,349 | 0 | python,azure,azure-table-storage | Returning number of entities in the table storage is for sure not available in Azure Table Storage SDK and service. You could make a table scan query to return all entities from your table but if you have millions of these entities the query will probably time out. it is also going to have pretty big perf impact on you... | 0 | 1 | 0 | 0 | 2017-05-10T05:42:00.000 | 2 | 1.2 | true | 43,884,375 | 0 | 0 | 0 | 1 | We have a table in Azure Table Storage that is storing a LOT of data in it (IoT stuff). We are attempting a simple migration away from Azure Tables Storage to our own data services.
I'm hoping to get a rough idea of how much data we are migrating exactly.
EG: 2,000,000 records for IoT device #1234.
The problem I am f... |
Flask gives "error 32 broken pipe" when being requested too often | 43,896,817 | 1 | 3 | 4,808 | 0 | python,flask,server | This error appear because your server is overloaded! Stop and start it! | 0 | 1 | 0 | 0 | 2017-05-10T12:58:00.000 | 5 | 0.039979 | false | 43,893,208 | 0 | 0 | 1 | 1 | I write a very simple flask server. This server response to GET and give back my home.html.
I visit the site on 127.0.0.1:5000
everything is good till now.
However, if I keep pressing "fresh" (Command+R on my computer) a lot of times for a few second, as fast as I can, then, my flask give this error and breaks down.
E... |
executing the python in another python file with arguments as path | 43,903,621 | 0 | 0 | 44 | 0 | python,windows,python-2.7 | If you really do not want to remove the whitespaces in your folder's name, put backslashes \ before the spaces in the variable z, to espace them. | 0 | 1 | 0 | 0 | 2017-05-10T22:06:00.000 | 2 | 0 | false | 43,903,460 | 1 | 0 | 0 | 1 | I am relatively new to python. I am trying to call a python file "plotting.py" in another file "main.py". To execute the "plotting.py" file the path should also be given as argument.
So in the "main.py" I have executed so
z='Stream 20170424 15_20_25_856'
os.system('python plotting.py '+z)
Where variable z is the name o... |
Python: Should I use shutil or subprocess to manipulate files and directories as a better approach? | 48,022,437 | 2 | 3 | 2,641 | 0 | linux,python-2.7,subprocess,shutil | I'll try to complement this after I go home, but just to begin I'll tell an example code I had wrote yesterday.
You can try it yourself though.
I had made 100k copies from an empty file with shutil and with subprocess.call, using the command time to get the execution time.
The result was worse than I expected.
shutil ... | 0 | 1 | 0 | 0 | 2017-05-11T03:12:00.000 | 3 | 0.132549 | false | 43,905,907 | 0 | 0 | 0 | 1 | I'm a beginner in Python and from a shell scripting background. I have learned shutil and also subprocess to create files/directories.
My question is, which one is better and recommended way of manage files in my OS(Linux/Windows) ? I read some Python books that discourage the use of OS commands to do so.
I'm comforta... |
Emacs fails to run Python code | 43,966,958 | 0 | 0 | 277 | 0 | python,python-3.x,emacs | Refer to @Ehvince's comment. Make sure that pylint, is in fact, installed using the command line. | 0 | 1 | 0 | 1 | 2017-05-13T18:49:00.000 | 2 | 0 | false | 43,956,820 | 0 | 0 | 0 | 2 | I'm using Emacs 24 and elpy to run some Python 3 code. However, after I open a shell with C-U-C-C-C-Z and then run my code with C-U-C-C-C-C, I get the error in my command line:
Cannot open load file: no such file or directory, pylint
This is odd, as I've made no recent changes to Emacs, but it always tends to be fin... |
Emacs fails to run Python code | 43,969,466 | 1 | 0 | 277 | 0 | python,python-3.x,emacs | Do you mean that it used to work ? To me this error means that the elisp pylint package was not installed or not "required". Try installing it with M-x package-install (and be sure to have the pypi pylint package installed in the current virtual env too, if you use one inside emacs -this is a current elpy installation ... | 0 | 1 | 0 | 1 | 2017-05-13T18:49:00.000 | 2 | 1.2 | true | 43,956,820 | 0 | 0 | 0 | 2 | I'm using Emacs 24 and elpy to run some Python 3 code. However, after I open a shell with C-U-C-C-C-Z and then run my code with C-U-C-C-C-C, I get the error in my command line:
Cannot open load file: no such file or directory, pylint
This is odd, as I've made no recent changes to Emacs, but it always tends to be fin... |
easy_install not working with no error | 43,981,171 | 1 | 1 | 347 | 0 | python,python-3.x,packages,easy-install | easy_install must be used as a command in the command prompt and it cannot be opened as an application. Go to the folder where easy_install is and open command-prompt in that folder. Now perform installation of any libraries using:
>easy_install pandas #example
Or you can set this path in your environment variables and... | 0 | 1 | 0 | 0 | 2017-05-15T13:01:00.000 | 1 | 1.2 | true | 43,980,261 | 0 | 0 | 0 | 1 | I'm trying to get new packages (request for example) and trying to do it through easy_install, but when I try to open it (both easy_install and easy_install-3.6) all I get is a blank terminal screen popping up for a second and than closing with nothing happening. What's wrong with it and how can I get new packages? |
Python + Linux: How to determine cron job is scheduled? | 43,987,885 | -1 | 0 | 542 | 0 | python,linux,automation,cron,crontab | Try with 10 * * * * yourscript name.Then check if crontab -l is include your script. Then you can check crontab logs. | 0 | 1 | 0 | 1 | 2017-05-15T19:58:00.000 | 2 | -0.099668 | false | 43,987,799 | 0 | 0 | 0 | 1 | Currently, I’ve scheduled a python script on Linux by adding the following: */10 * * * * /file/testscripts/test_script.py to crontab -e.
It did not run after 10 minutes, so I wrote some code to write the current time on there but wasn’t being updated either.
What could be the issue? And how can I determine my python ... |
How to make bottle server HTTPS python | 44,016,254 | 2 | 8 | 4,247 | 0 | python-3.x,https,cherrypy,bottle | You need to put your WSGI server (not WsgiRef certainly) behind a reverse-proxy with https support. Nginx is the most common choice. | 0 | 1 | 1 | 0 | 2017-05-16T23:18:00.000 | 3 | 0.132549 | false | 44,013,107 | 0 | 0 | 1 | 1 | I'm using Bottle as my webservice. Currently, its running on bottle's default wsgi server and handles HTTP requests. I want to encrypt my webservice and handle HTTPS requests. Can someone suggest a method for this. I tried running on cherrypy server, but the latest version is not supporting the pyOpenSSLAdapter. |
Tensorflow and Pycharm | 44,022,536 | 3 | 1 | 921 | 0 | python,tensorflow,pycharm,cudnn | The solution is:
Run PyCharm from the console.
OR
add the environment variable to the IDE settings: LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH | 0 | 1 | 0 | 0 | 2017-05-17T08:54:00.000 | 1 | 1.2 | true | 44,020,050 | 0 | 1 | 0 | 1 | I have an issues with tensorflow on pycharm.
Whenever I import tensorflow in the linux terminal, it works correctly. However, in PyCharm community 2017.1, it shows:
ImportError: libcudnn.so.5: cannot open shared object file: No such file or directory
Any hint on how to tackle the issue.
Please note that I am using pyth... |
Python gtk3 filechooser restrict folder | 44,053,546 | 0 | 0 | 518 | 0 | python,ubuntu,gtk,gtk3 | Limiting directory changes isn't directly available in FileChooser, but there are a few ways:
You can define file filters (Gtk.FileFilter) but those basically filter on the file extension (or mime type).
More interesting is that, when changing the folder, a signal is emitted called 'current_folder_changed'. So, you co... | 1 | 1 | 0 | 0 | 2017-05-17T11:16:00.000 | 1 | 1.2 | true | 44,023,311 | 0 | 0 | 0 | 1 | Can gtk filechooser set to be folder-restricted?
A normal filechooser will display all folder files tree starting from / (root), what I need is, to allow filechooser displaying only from /media folder only. So, the top visible folder is only /media, not everything else like /home, /usr, etc.
Thank you for all your kind... |
How to run a python program from c++ | 44,025,218 | 0 | 0 | 362 | 0 | python,c++,python-3.x,c++11 | There's POSIX popen and on Windows _popen, which is halfway between exec and system. It offers the required control over stdin and stdout, which system does not. But on the other hand, it's not as complicated as the exec family of functions. | 1 | 1 | 0 | 1 | 2017-05-17T11:41:00.000 | 2 | 0 | false | 44,023,863 | 0 | 0 | 0 | 1 | I am trying to make a program in c++, but i cant make the program because in one part of the code I need to run a python program from c++ and I dont know how to do it. I've been trying many ways of doing it but none of them worked. So the code should look sometihnglike this:somethingtoruntheprogram("pytestx.py"); or so... |
worker: Warm shutdown (MainProcess) after task started | 44,094,110 | 2 | 1 | 4,467 | 0 | python,celery,celery-task,celeryd | Using CELERY_ACKS_LATE = True solved the problem | 0 | 1 | 0 | 0 | 2017-05-18T09:18:00.000 | 1 | 1.2 | true | 44,043,579 | 0 | 0 | 0 | 1 | Setup: Celery 3.1, broker=RabbitMQ, backend=Redis.
Scenario:
Having a task is state=STARTED (running) my worker is being restarted. I'm getting worker: Warm shutdown (MainProcess) message (stdout). The worker successfully restarted but the task is stuck on STARTED state (monitored via flower) and nothing happen.
Desir... |
Python Watchdog Issue Not triggering Events for files saved by external software | 46,293,315 | 1 | 0 | 885 | 0 | python,filesystems,inotify,watchdog,python-watchdog | Yes it does. Check how is the external program creating the file. In my case, the external program was creating a file with filename initiated with a '.' and ending with '.tmp' and when it is done writing to the temporary file it was moving it to actual filename which is ending with '.json'(for which I have set up the ... | 0 | 1 | 0 | 0 | 2017-05-18T11:36:00.000 | 1 | 0.197375 | false | 44,046,665 | 0 | 0 | 0 | 1 | Does watchdog's "trigger event on file creation" depend on anything specific to how the files are created? I'm finding a discrepancy between when files are saved into a directory by an external program and when they are copied into the directory.
I'm using watchdog to monitor a directory, trigger off new files crea... |
How to allocate more memory for docker container? | 44,055,755 | 3 | 0 | 808 | 0 | python,docker,flask | By default docker does not restrict memory usage by containers. However, on Mac and Windows installs, Docker runs in a VM and that VM is limited in how much memory it takes from your OS. You can adjust this setting in the Docker preferences for Mac and Windows. | 0 | 1 | 0 | 0 | 2017-05-18T13:03:00.000 | 1 | 1.2 | true | 44,048,555 | 0 | 0 | 1 | 1 | I have python flask app which loads to memory large file (3.5 GB). When I run that app in docker, it doesn't respond to requests, but container somehow works. When I try to run my app without loading that large file to memory it respons to requests. |
How to set real time priority with psutil | 55,455,049 | 1 | 2 | 1,253 | 0 | python,process,psutil | I had exactly the same problem, running python with "as Administrator" solved the issue (On Win10 with python3.7).
Create a windows shortcut to "python " and set "Run as administrator" in the Advanced settings of the shortcut. | 0 | 1 | 0 | 0 | 2017-05-18T13:52:00.000 | 1 | 1.2 | true | 44,049,685 | 0 | 0 | 0 | 1 | How can I set real time priority with psutil. When I try this: process.nice(psutil.REALTIME_PRIORITY_CLASS) REALTIME_PRIORITY_CLASS results in HIGH_PRIORITY_CLASS. |
Cmake files detection | 44,056,709 | 0 | 0 | 145 | 0 | python,cmake | Any file should be explicitely mentioned in CMakeLists.txt in some way for track its changes in CMake.
That is why using GLOB() command for collect sources is not recommended: CMake will not detect automatically whether new source file has been added. | 0 | 1 | 0 | 0 | 2017-05-18T18:13:00.000 | 1 | 1.2 | true | 44,055,109 | 0 | 0 | 0 | 1 | I have a sub-directory in which i have my python files for compilation
I added a new file and accidentally forgot to add it to CMakeList.txt
The problem is that the build was successful.
My question is does CMake detect automatically all the files in the indicated sub-directory? or does it detect any files that have d... |
Windows environment variable that runs a script | 44,077,157 | 1 | 0 | 45 | 0 | python,windows | No, there is no way to set an environment variable that calls a function when addressed. That's simply not something that environment variables can do. | 0 | 1 | 0 | 0 | 2017-05-19T18:50:00.000 | 1 | 0.197375 | false | 44,077,099 | 1 | 0 | 0 | 1 | Is it possible to set a environment variable in Windows 7 that will run a python script when called? Couldn't do it when I tried. |
Can I distribute a python application with docker? | 44,078,274 | 4 | 1 | 317 | 0 | python,docker | If they have docker then you can distribute your whole application as a docker image. This is the main docker use-case. | 0 | 1 | 0 | 0 | 2017-05-19T19:55:00.000 | 2 | 0.379949 | false | 44,078,101 | 0 | 0 | 0 | 1 | I am developing a python application (a package) that can be distributed with distutils.
I need to share it with someone that does not have python installed.
Is it possible to bundle the entire package and distribute it with docker? |
Messed up with two python versions on linux | 44,082,982 | 0 | 0 | 420 | 0 | python,linux | From what I understood,
You have two version of python. One is in /usr/local/bin/python
and another is in /usr/bin/python.
In your current configuration default python ->
/usr/local/bin/python
You want to use the one that is in /usr/bin.
Update your ~/.bashrc and append this line at the end
alias python=/usr/bin/p... | 0 | 1 | 0 | 0 | 2017-05-20T05:49:00.000 | 2 | 1.2 | true | 44,082,419 | 1 | 0 | 0 | 1 | As I understood, I have two versions of python 2.7 installed on my machine. One is located in /usr/bin and another one is in /usr/local/bin. When I type python in the shell, it calls one in /usr/local/bin, and it doesn't have access to all the packages installed using apt-get and pip. I have tried to set up an alias, b... |
Trying to open Google Earth via a Script, file path nonexistent | 44,089,362 | 0 | 0 | 103 | 0 | python,terminal,filepath | Two problems going on here:
1) That path is probably correct. You're not using find correctly, in particular. You need to do sudo find / -name "*.app" (note the quotes around *app). From the man page:
-iname pattern
Like -name, but the match is case insensitive. For example, the patterns 'fo*' and 'F??' match th... | 0 | 1 | 0 | 0 | 2017-05-20T17:43:00.000 | 1 | 1.2 | true | 44,089,046 | 0 | 0 | 0 | 1 | I am trying to build a script that opens the Google Earth.app which I can see in Finder, but when I go to the applications folder it is not present. I looked at some other posts to find the filepath of Google Earth.app via sudo find / -iname *.app, which was /Applications/Google Earth.app. When I try and find this file... |
[Python ]google app engine deploying the file to server | 44,226,486 | 1 | 0 | 22 | 0 | python,google-app-engine | You cannot to my knowledge edit the codebase once it's uploaded - it can only be modified locally. If you want to access app engine have a look at appengine.google.com . If you look under "Versions" you'll see some the links to the version(s) of your app. | 0 | 1 | 0 | 0 | 2017-05-21T13:25:00.000 | 1 | 1.2 | true | 44,097,436 | 0 | 0 | 1 | 1 | Hello I did a hello world python application in local host and then I deployed it to the google app engine using google application launcher but I don't know where access it inside the google app engine from inside the dashboard.And is there any way through which I can edit the hello world once its uploaded to app engi... |
How to install a module to one of many pythons in Fedora 20 | 44,102,104 | 0 | 0 | 311 | 0 | python,module | Check if pip36 or more likely pip3 is a function you can run. Often times the pip command corresponds to the first installed python version, so if you install one later it gets the suffix according to its version. If that is the case then you'll want to do pip36 (pip3) install moduleXYZ. | 0 | 1 | 0 | 0 | 2017-05-21T21:42:00.000 | 2 | 0 | false | 44,102,086 | 1 | 0 | 0 | 1 | I have on my Fedora 20 additionally to 2.7 a python3.6 version installed.
When I run a script with the 3.6 version it's missing the requests module.
When I try to install it with the pip command it says it's already there.
So, how can I install this module in python3.6?
Any hints?
Thanks |
Getting Terminal to do something else while running a localhost on it. | 44,108,967 | 0 | 0 | 35 | 0 | python,google-app-engine,terminal | That instance of the terminal will be busy doing the thing you asked it to. But you can just open a new window or tab. | 0 | 1 | 0 | 0 | 2017-05-22T08:55:00.000 | 1 | 1.2 | true | 44,108,625 | 0 | 0 | 0 | 1 | How come I can't do anything else on terminal when It's running a localhost. Like I run a google app engine on it and make a new local host, I for example try to see what directory I'm in or even change directories, it doesn't respond to any of my requests? Thank you |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.