2

From today, I started getting error while installing modules from requirements.txt, I tried to find the error module and remove it but I couldn't find.

Pillow
nospamplus
pymediainfo
apscheduler
howdoi
pyseoanalyzer
pokedex.py
faker
deep_translator
pornhub-api
countryinfo
emoji-country-flag
langdetect
PyProxyToolkit
cairosvg
grapheme
cryptosteganography
QScintilla
requests_html
flask
yahoo_fin
anime_downloader
pandas
PyDictionary
fontTools
pydub
quote
lottie
textblob
python-magic
glitch_this
PyGithub
pytesseract
youtube-dl
opencv-contrib-python
telethon
iplookup
wget
numpy
googletrans
pyshorteners
aiohttp
bs4
coffeehouse
cowpy
emoji
gTTS-token>=1.1.3
gTTS>=2.0.1
geopy
gitpython
google-api-python-client==1.8.0
google-auth-oauthlib
google_images_download>=2.7.1
gsearch
hachoir
heroku3
httplib2
humanize
lxml
lyricsgenius
oauth2client
psycopg2-binary
PyLyrics
pySmartDL
pybase64>=0.4.0
pyfiglet
pylast
python-barcode
python-dotenv
pytz
qrcode
regex
requests
search-engine-parser>=0.4.2
selenium
speedtest-cli>=2.0.2
sqlalchemy>=1.2
telegraph
tswift
urbandict>=0.5
wikipedia>=1.4.0
youtube-search
password_strength
pyjokes
cryptocompare

These are the modules. Below is the error I get:

Collecting goslate
  Downloading goslate-1.5.1.tar.gz (17 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u0eft0x8/goslate_a9d50754d502446c876c20f9eb75ad67/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u0eft0x8/goslate_a9d50754d502446c876c20f9eb75ad67/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-tybqx6p2
         cwd: /tmp/pip-install-u0eft0x8/goslate_a9d50754d502446c876c20f9eb75ad67/
    Complete output (26 lines):
    running egg_info
    creating /tmp/pip-pip-egg-info-tybqx6p2/goslate.egg-info
    writing /tmp/pip-pip-egg-info-tybqx6p2/goslate.egg-info/PKG-INFO
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-u0eft0x8/goslate_a9d50754d502446c876c20f9eb75ad67/setup.py", line 19, in <module>
        setup(
      File "/usr/local/lib/python3.9/dist-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.9/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/local/lib/python3.9/dist-packages/setuptools/command/egg_info.py", line 292, in run
        writer(self, ep.name, os.path.join(self.egg_info, ep.name))
      File "/usr/local/lib/python3.9/dist-packages/setuptools/command/egg_info.py", line 628, in write_pkg_info
        metadata.write_pkg_info(cmd.egg_info)
      File "/usr/lib/python3.9/distutils/dist.py", line 1117, in write_pkg_info
        self.write_pkg_file(pkg_info)
      File "/usr/local/lib/python3.9/dist-packages/setuptools/dist.py", line 140, in write_pkg_file
        write_field('Summary', single_line(self.get_description()))
      File "/usr/local/lib/python3.9/dist-packages/setuptools/dist.py", line 124, in single_line
        raise ValueError("newlines not allowed")
    ValueError: newlines not allowed
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The command '/bin/sh -c pip3 install -r requirements.txt' returned a non-zero code: 1

I tried to find and remove goslate module, but I couldn't find. Maybe this goslate is required by one of my modules.

Nir Alfasi
  • 53,191
  • 11
  • 86
  • 129

1 Answers1

0

Create a list of all the dependencies and run the following code.

for l in list:
 print('checking for {}'.format(l))
 url = 'https://pypi.org/pypi/{}/json'
 json = requests.get(url.format(l)).json()
 if json['info']['requires_dist'] is not None:
         if 'goslate' in json['info']['requires_dist']:
                 print('found one ! : {}'.format(l))

this will check all if goslate is in any of the modules that you need.

got help from here How to list dependencies for a python library without installing?

Volpym
  • 161
  • 1
  • 1
  • 14