Python rename files reading names from csv file

Hi there i've been trying to adapt this to my needs but I'm just a newbe in python, I have a csv file with multiple columns and rows, important columns are 1 = old name of file, and 2 = new name...

one hot encoding for frequent values only

I am looking to do one hot encoding to a column, but only for those that are very frequent. All that are below a threshold T will be put in their own category. My strategy was to create a...

How to avoid the connection error when I am opening a website automatically?

I am web-scraping a few websites on Debian with Python 2.7, but maybe my code automatically stop (if it can't load in time (freeze) or there isn't an internet connection). Is there any solution to...

pip install faling with error gevent failed with error code 1 in /private/tmp/pip-build-muEt66/gevent/

I have a virtualenv. Inside the virtualenv i want to install some dependencies from a file. My command being pip intsall -r requirements.txt I am attaching the terminal error output here. First...

"name 'word_tokenize' is not defined" in python word count frequency

i am trying to figure out the word frequency from the specific word column. I want to remove the stopwords from the dictionary. Here's the code : #Code import unicodecsv as csv import nltk import...

Python multiprocessing scraping, duplicate results

I'm building a scraper that needs to perform pretty fast, over a large amount of webpages. The results of the code below will be a csv file with a list of links (and other things). Basically, I...

Conda takes 20+ minutes to solve environment when package is already installed

NOTE: I'm duplicating this post because the question has been up on the conda github page for ~6-days with no response. The original link is...

Python 3.7 anaconda environment - import _ssl DLL load fail error

I created anaconda environment with Python=3.7 and have trouble with the error of _ssl and DLL. When I tried to get back to my base environment, I have trouble getting the background processes to...

Import error of contextily package in python

I installed the package contextily with pip install contextily, it appears when I do conda list # Name Version Build Channel _ipyw_jlab_nb_ext_conf ...

WEBP support not installed error with Pillow included in Anaconda

I have written a small code to open webp image in the Anaconda prompt. from PIL import Image im = Image.open('test.webp') It causes the following...

"AssertionError: Torch not compiled with CUDA enabled" in spite upgrading to CUDA version

I figured out this is a popular question, but still I couldn't find a solution for that. I'm trying to run a simple repo Here which uses PyTorch. Although I just upgraded my Pytorch to the latest...

UnsatisfiableError: The following specifications were found to be incompatible with each other:

I am running on Ubuntu 16.04 and I have run into issues with Anaconda. Due to package inconsistencies, I can no longer install, update or remove packages. $ conda info NVIDIA: no NVIDIA devices...

ERROR: You must give at least one requirement to install -- when running: pip install --upgrade --no-binary hdbscan

I am trying to install hdbscan in my PC which runs Windows 10 and has installed Python 3.6. My first attempt failed: (base) C:\WINDOWS\system32>pip install hdbscan --user Collecting hdbscan ...

No module named 'matplotlib.artist'

I faced with this error No module named 'matplotlib.artist' here is the complete error: --------------------------------------------------------------------------- ModuleNotFoundError ...

Scraping yellowpages

I am trying to scrape data from people.yellowpages.com i only need is Email,Phone,Address. I have been working on this code lately and it worked for business related organizations. but when it...

error H13 on heroku on an dash application

import requests from bs4 import BeautifulSoup import pandas as pd import dash import dash_core_components as dcc import dash_html_components as html import...

Problem with creating an environment from .yml file, error "CondaEnvException: Pip failed" raised

I am trying to create an environment based on a .yml file, the name of the file is env.yml . I run the following snippet on terminal: conda env create -f env.yml Then anaconda starts...

virtualenv: pre-installed with packages on creating virtual environment

I created a virtual environment using command virtualenv env on my terminal. On using pip freeze > requirements.txt after activating the virtual environment, I was a bunch of packages...

Why does `conda list cudnn` have no output after `conda install pytorch torchvision cudatoolkit=10.2 -c pytorch` installation

*Please feel free to vote "Reopen" at the bottom of this question. The reason is that I have marked this as a duplicate although the answers there are not clear enough for this question.* As soon...

It seems that scikit-learn has not been built correctly

I have been using Jupyter Notebook for my machine learning project. Before scikit-learn was working fine but eventually I installed pip install imblearn and pip install -U imbalanced-learn after...

Trouble installing turbodbc

I am attempting to install turbodbc on my Ubuntu 20.10 machine. My specs are as follows: pip 20.2.4, Python 3.8.5 , gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0 I have attempted the solutions provided in...

AWS Python Lambda Function - Write a UTF-8 encoded CSV to S3

I am trying to write a CSV file to my S3 bucket from inside a Lambda function. Everything is fine, except I cannot capture special characters; basically I need my file to be UTF-8 encoded. I do...

Invalid requirement

I converted the requirements of my project into a txt file with the method below. pip freeze > requirements.txt And I tried to load the generated txt file with the code below to test it, but I...

Using apache-airflow-providers-snowflake on airflow (no module named Snowflake)

I have installed package apache-airflow-providers-snowflake on airflow on docker and i am getting error No module named Snowflake Please refer attachment (check the error mentioned for the...

Updating packages in conda

I have a problem with updating packages in conda. The list of my installed packages is: # # Name Version Build Channel _anaconda_depends 2020.07 ...

PythonVirtualenvOperator using airflow module fails to execute with AttributeError: module 'airflow' has no attribute 'utils'

I have Airflow deployed in virtual env and in case I try to execute PythonVirtualenvOperator with import of the Airflow module (to get Variables for example) it gives me the AttributeError. Guess...

This version of ChromeDriver only supports Chrome version 87 Current browser version is 90.0.4430.93

ChromeDriver is giving an error about its version being too low: This version of ChromeDriver only supports Chrome version 87 Current browser version is 90.0.4430.93. I've updated pip's packages...

NameError: name '_mysql' is not defined -- On airflow start in MacOSX

There are numbers of articles on the titled question but none of them worked for me. The detailed error is as follows: Traceback (most recent call last): File...

How to correctly install PyICU on Heroku?

I am trying to deploy my Python app on Heroku, but have been unsuccessful. It seems that a problem is occurring with the PyICU package, which I'm unsure how to correct. I've confirmed that this is...

Building wheel for cffi (setup.py) ... error while installing the packages from requirements.txt in django

I am trying to install a new Django project from git, I created a new virtual envt using python3(version: 3.8.5). When I try to install the required libraries in the requirements.txt, I get the...