python-3.5

install scipy package via pycharm in windows 10 64 bit - python 3.5

心已入冬 提交于 2019-12-12 04:30:30
问题 In PyCharm a "Python-IDE" in my window 10 64 bit , I want to install "Scipy". First of all in {Pycharm -> File -> Settings -> interpreter} I chose C:\Users\XXXXX\AppData\Local\Programs\Python\Python35-32\python.exe then I installed pip - matplotlib - numpy and labpack. Now I want to install scipy package but I got this error. How can I solve this issue? 回答1: It sounds like you have an installation of numpy that was not compiled with LAPACK. You can get a pre-compiled version from Christopher

Python 3.5.1: Change file name

大憨熊 提交于 2019-12-12 03:23:16
问题 import os import re def rename_files(): #get file names from a folder file_list = os.listdir("/Users/myname/Desktop/Python") #print (file_list) saved_path = os.getcwd() print(saved_path) os.chdir("/Users/myname/Desktop/Python") #rename each file for file_name in file_list: os.rename(file-name, re.sub("[0-9]", "", file_name)) os.chdir(saved_path) rename_files() The above code should rename each file that is located inside a specific folder by removing all NUMBERS from the file name, but

Flask-Uploads gives AttributeError?

心不动则不痛 提交于 2019-12-12 02:43:25
问题 from flask import Flask from flask.ext.uploads import UploadSet, configure_uploads, IMAGES app = Flask(__name__) app.config['UPLOADED_PHOTOS_DEST'] = '/home/kevin' photos = UploadSet('photos', IMAGES) configure_uploads(app, (photos,)) The above is my code, however it gives me the following error: Traceback (most recent call last): File "./main.py", line 10, in <module> configure_uploads(app, (photos,)) File "/usr/lib/python3.5/site-packages/flaskext/uploads.py", line 197, in configure_uploads

How to scrape href with Python 3.5 and BeautifulSoup [duplicate]

偶尔善良 提交于 2019-12-12 02:23:49
问题 This question already has answers here : retrieve links from web page using python and BeautifulSoup (16 answers) Closed 3 years ago . I want to scrape the href of every project from the website https://www.kickstarter.com/discover/advanced?category_id=16&woe_id=23424829&sort=magic&seed=2449064&page=1 with Python 3.5 and BeautifulSoup. That's my code #Loading Libraries import urllib import urllib.request from bs4 import BeautifulSoup #define URL for scraping theurl = "https://www.kickstarter

import error in wxPython: import wx.animate on windows7(64bit OS) with python3.5.1 in Anaconda 4.2.0(32bit)

独自空忆成欢 提交于 2019-12-12 02:17:40
问题 I am working on Windows7(64 bit OS) with Anaconda's python 3.5.1(32bit). I have installed wxPython for GUI. I keep getting the below import error ImportError: No module named 'wx.animate' import wx is working fine. import wx wx.version() gives '3.0.3.dev2752+8304ec1 msw (phoenix)'' I have installed wxPython from https://wxpython.org/Phoenix/snapshot-builds/ the version is, wxPython_Phoenix-3.0.3.dev2752+8304ec1-cp35-cp35m-win32.whl I have checked the path and don't see any problem there.. Can

Django 1.10 Templating/staticfiles not showing any images

寵の児 提交于 2019-12-12 01:56:30
问题 I am trying to enable Django templating in 1.10 and it is not behaving correctly. Anything I have referenced to be called from the static files (./manage.py collectstatic) is not showing where referenced in the html. I have it imported in my views: from django.shortcuts import render, render_to_response from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth.forms import UserCreationForm from django.template import loader from django.contrib.auth.decorators import

Python Automatically ignore unicode string

ⅰ亾dé卋堺 提交于 2019-12-12 01:26:39
问题 I've been searching to automatically import some files but since I'm on Windows i got the unicode error (because of the "C:\Users\..."). I've been looking to correct this error and found some hints (using r" MyString " or u" MyString " for raw and unicode strings) and I have been directed to this page (https://docs.python.org/3/howto/unicode.html). But since my problem is about a GUI interface to automatically import some files, I haven't figured out the way to do it. I'll leave you my hints

Python 3.5.1 - Give user 3 invalid attempts then terminate pgm (Simple FOR loop)

戏子无情 提交于 2019-12-12 00:35:49
问题 I need assistance (new student - 2 weeks). I'd like to get the most minimal changes possible to this code that allows a user 3 chances at typing in the incorrect values for each conversion in the program. After typing in an incorrect value 3 times, the program should terminate. The only requirement is that the code must contain a FOR loop. I don't know if it requires one FOR loop or 3 FOR loops (one for each conversion). I've tried so many scenarios and can't seem to get it right. Thank you !

Cant allow notification which may not be an alert [duplicate]

橙三吉。 提交于 2019-12-11 23:38:19
问题 This question already has answers here : How to allow or deny notification geo-location microphone camera pop up (1 answer) How to click Allow on Show Notifications popup using Selenium Webdriver (8 answers) Closed last year . As suggested by @DebanjanB the popup which is clearly visible between the WebDriverWait starts and WebDriverWait ends message may not be an alert. How do we press allow in such case. chrome_options = webdriver.ChromeOptions() prefs = { "profile.default_content_setting

Python While Loop - Variable Not Updating?

扶醉桌前 提交于 2019-12-11 19:39:02
问题 This code simply looks for a string in another string and returns the last postion of the occurance in the search string or -1 if its is not found. I don't understand why my variable next_y is not updating considering that pos is an input into computation of next_y . My thought that is that if I update pos then next_y should also update. Instead pos gets updated and remains in the loop forever. def find_last(x,y): if x.find(y) == -1: return -1 pos = x.find(y) next_y = x.find(y, pos + 1) while