Python Forum
Error about missing directory
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error about missing directory
#1
Whenever I try to install software such as neat I get the following error:

Output:
(base-dup) C:\Users\james\Downloads>pip install neat Requirement already satisfied: neat in c:\users\james\miniconda3\envs\base-dup\lib\site-packages (0.4.1) Requirement already satisfied: WebOb in c:\users\james\miniconda3\envs\base-dup\lib\site-packages (from neat) (1.8.7) WARNING: Error parsing requirements for beautifulsoup4: [Errno 2] No such file or directory: 'c:\\users\\james\\miniconda3\\envs\\base-dup\\lib\\site-packages\\beautifulsoup4-4.9.3.dist-info\\METADATA'
the directory .... beautifulsoup4\METADATA does not exist.

However, beautifulsoup4 is installed and is located as a sub directory of site-packages
How do I fix this? I am on Windows 10, 64bit.

Again METADATA does not exist. If I create that directory as a subdirectory of beautifulsoup4 will that fix it?

Any help appreciated.

Thanx

Respectfully,

LZ
Reply
#2
The last line in your output is just a warning. I wouldn't think that would indicate a real problem yet. Do you get errors if you try to use neat?
Reply
#3
Yes. I cannot use neat because it does not install. Any system which requires beautifulsoup4 fails to install not just neat.

I have checked this on a Macbook Air with M1 processor and the directory is installed as a subdirectory of beautifulsoup4.

In fact I would say that I have never got beautifulsoup4 installed on my Windows 10 machine.

Also when it prints out this warning. Why use double slashes? I certainly do not use them when I create my directory structure.

I just cannot get beautifulsoup4 to install. When I install neat,beautifulsoup4 is a dependency and it just will not install hence neat will not install.

How to fix?


Respectfully,

LZ
Reply
#4
Clean up uninstall
pip uninstall beautifulsoup4 
pip uninstall bs4
Then install with pip install beautifulsoup4 or conda install -c anaconda beautifulsoup4

If all fail just make new environment that's some the point using miniconda.
Example:
G:\miniconda3\Scripts
λ activate base

(base) G:\miniconda3\Scripts
λ cd ..

# Make new environment,will also here using newest Python 3.9.6 
(base) G:\miniconda3
λ conda create --name new_env conda jupyterlab beautifulsoup4 requests lxml python=3.9.6

.....
Downloading and Extracting Packages
requests-2.26.0      | 52 KB     | ################################################################################## | 100%
zeromq-4.3.4         | 8.9 MB    | ################################################################################## | 100%
pywin32-301          | 7.0 MB    | ################################################################################## | 100%
zipp-3.5.0           | 12 KB     | ################################################################################## | 100%
anyio-3.3.0          | 148 KB    | ################################################################################## | 100%
jupyter_server-1.10. | 265 KB    | ################################################################################## | 100%
tqdm-4.62.2          | 80 KB     | ################################################################################## | 100%
terminado-0.11.1     | 28 KB     | ################################################################################## | 100%
python_abi-3.9       | 4 KB      | ################################################################################## | 100%
jupyterlab-3.1.9     | 5.8 MB    | ################################################################################## | 100%
bleach-4.1.0         | 121 KB    | ################################################################################## | 100%
jupyter_client-7.0.2 | 85 KB     | ################################################################################## | 100%
ipykernel-6.3.1      | 174 KB    | ################################################################################## | 100%
conda-4.10.3         | 3.1 MB    | ################################################################################## | 100%
libxslt-1.1.33       | 498 KB    | ################################################################################## | 100%
debugpy-1.4.1        | 3.2 MB    | ################################################################################## | 100%
pygments-2.10.0      | 760 KB    | ################################################################################## | 100%
send2trash-1.8.0     | 17 KB     | ################################################################################## | 100%
nbclient-0.5.4       | 60 KB     | ################################################################################## | 100%
packaging-21.0       | 35 KB     | ################################################################################## | 100%
prompt-toolkit-3.0.2 | 246 KB    | ################################################################################## | 100%
pip-21.2.4           | 1.1 MB    | ################################################################################## | 100%
beautifulsoup4-4.9.3 | 86 KB     | ################################################################################## | 100%
conda-package-handli | 733 KB    | ################################################################################## | 100%
sqlite-3.36.0        | 1.2 MB    | ################################################################################## | 100%
pandoc-2.14.2        | 17.2 MB   | ################################################################################## | 100%
tzdata-2021a         | 121 KB    | ################################################################################## | 100%
importlib-metadata-4 | 33 KB     | ################################################################################## | 100%
mistune-0.8.4        | 54 KB     | ################################################################################## | 100%
ipython-7.27.0       | 1.2 MB    | ################################################################################## | 100%
pyzmq-22.2.1         | 489 KB    | ################################################################################## | 100%
urllib3-1.26.6       | 99 KB     | ################################################################################## | 100%
libiconv-1.16        | 680 KB    | ################################################################################## | 100%
menuinst-1.4.17      | 95 KB     | ################################################################################## | 100%
vc-14.2              | 13 KB     | ################################################################################## | 100%
vs2015_runtime-14.29 | 1.3 MB    | ################################################################################## | 100%
python-dateutil-2.8. | 240 KB    | ################################################################################## | 100%
charset-normalizer-2 | 32 KB     | ################################################################################## | 100%
soupsieve-2.0.1      | 30 KB     | ################################################################################## | 100%
pywinpty-1.1.3       | 177 KB    | ################################################################################## | 100%
openssl-1.1.1k       | 5.8 MB    | ################################################################################## | 100%
pycosat-0.6.3        | 102 KB    | ################################################################################## | 100%
jupyterlab_server-2. | 44 KB     | ################################################################################## | 100%
wheel-0.37.0         | 31 KB     | ################################################################################## | 100%
lxml-4.6.3           | 1.1 MB    | ################################################################################## | 100%
nbconvert-6.1.0      | 548 KB    | ################################################################################## | 100%
idna-3.1             | 52 KB     | ################################################################################## | 100%
setuptools-57.4.0    | 965 KB    | ################################################################################## | 100%
cffi-1.14.6          | 229 KB    | ################################################################################## | 100%
ruamel_yaml-0.15.80  | 283 KB    | ################################################################################## | 100%
python-3.9.6         | 19.9 MB   | ################################################################################## | 100%
requests-unixsocket- | 14 KB     | ################################################################################## | 100%
libxml2-2.9.12       | 3.5 MB    | ################################################################################## | 100%
ucrt-10.0.20348.0    | 1.2 MB    | ################################################################################## | 100%
notebook-6.4.3       | 6.3 MB    | ################################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done


# Active new environment  
(base) G:\miniconda3
λ conda activate new_env

# Test that it work
(new_env) G:\miniconda3\Scripts
λ python
Python 3.9.6 | packaged by conda-forge | (default, Jul 11 2021, 03:37:25) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
>>> from bs4 import BeautifulSoup
>>>
>>> soup = BeautifulSoup('<title>Python Forum</title>', 'lxml')
>>> soup.find('title').text
'Python Forum'
>>> exit()

(new_env) G:\miniconda3\Scripts
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Coding error. Can't open directory EddieG 6 1,130 Jul-13-2023, 06:47 PM
Last Post: deanhystad
  Using pyinstaller with .ui GUI files - No such file or directory error diver999 3 3,393 Jun-27-2023, 01:17 PM
Last Post: diver999
  List of error codes to find (and count) in all files in a directory tester_V 8 3,716 Dec-11-2020, 07:07 PM
Last Post: tester_V
  Error With Reading Files In Directory And Calculating Values chascp 2 2,454 Feb-15-2020, 01:57 PM
Last Post: chascp
  Python 2.7 Import error. Directory and filename conflict petcoo00 2 2,393 Feb-02-2020, 08:46 PM
Last Post: snippsat
  pygame.error: /etc/timidity.cfg: No such file or directory lsepolis123 3 4,325 Aug-23-2019, 07:53 AM
Last Post: lsepolis123
  Type error: dump() missing 1 required positional argument: fp jaycuff13 2 21,958 Jul-13-2019, 10:21 AM
Last Post: jaycuff13
  How to fix error code 2 in python, “directory not found”? dav3javu 1 7,048 Apr-03-2019, 04:55 PM
Last Post: Larz60+
  missing 1 required positional argument error nikos 3 7,497 Feb-28-2019, 12:53 PM
Last Post: nikos
  Python Directory and File Create Error basic_learner 1 2,429 Dec-16-2018, 11:03 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020