stefmolin / Hands-On-Data-Analysis-with-Pandas-2nd-edition

Materials for following along with Hands-On Data Analysis with Pandas – Second Edition
https://www.amazon.com/Hands-Data-Analysis-Pandas-visualization/dp/1800563450
MIT License
582 stars 1.39k forks source link

launching the virtual environment and setting up libraries #49

Closed Donarmando2 closed 1 month ago

Donarmando2 commented 2 months ago

Required attestation


Background information

1. Which OS are you using?

TODO: Provide your OS here – make sure to differentiate between Intel and M1 chip Macs.

2. Which Python version are you using?

TODO: Provide your Python version here.

3. Are you using conda or venv?

TODO: Indicate whether you are using conda or venv.


Commands run and their outputs

Please provide all of the commands you ran as well as the traceback:

``` TODO: paste commands and any traceback here ```

Screenshots

Optionally, include any screenshots that will help diagnose the issue.

Donarmando2 commented 2 months ago
  1. Which OS are you using? Windows10

  2. Which Python version are you using? 3.11

  3. Are you using conda or venv? venv

' '4. see all the setup steps here environment setup and recap.txt

Donarmando2 commented 2 months ago

i was able to launch Jupyter and it displays as shown inside the book...I follow instructions of page 48 to check out my installation See the results in enclosed file... How to handle this ? Setup checking

stefmolin commented 2 months ago

Hi there – you mention that you are using Python 3.11, which is not supported. You need to use Python 3.8 otherwise some of the versions of the packages used in the book won't be available.

From the output you shared your computer is missing some system libraries, which is preventing you from installing numpy and anything that relies on it so the installation of the dependencies failed on your machine. For this reason, I recommend that you, as a Windows user, use conda and not venv. Follow the directions for conda, and it will also set you up with the correct Python version.

WARNING: Someone is using fake accounts to put links to malware on this issue. Do not click on any links.

Donarmando2 commented 2 months ago

Hi there – you mention that you are using Python 3.11, which is not supported. You need to use Python 3.8 otherwise some of the versions of the packages used in the book won't be available.

From the output you shared your computer is missing some system libraries, which is preventing you from installing numpy and anything that relies on it so the installation of the dependencies failed on your machine. For this reason, I recommend that you, as a Windows user, use conda and not venv. Follow the directions for conda, and it will also set you up with the correct Python version.

PS

Ok i will go back to Conda section and try out........ and let you know. Thanks for the update

Donarmando2 commented 2 months ago

Hi there – you mention that you are using Python 3.11, which is not supported. You need to use Python 3.8 otherwise some of the versions of the packages used in the book won't be available.

From the output you shared your computer is missing some system libraries, which is preventing you from installing numpy and anything that relies on it so the installation of the dependencies failed on your machine. For this reason, I recommend that you, as a Windows user, use conda and not venv. Follow the directions for conda, and it will also set you up with the correct Python version.

PS

i create a folder HODAP_2 inside i save all the book files then i create the environment in the following steps

(base) C:\Users\user\Documents\HODAP_2>conda create --name my_env python=3.8 Retrieving notices: ...working... done Channels:

Package Plan

environment location: C:\Users\user\anaconda3\envs\my_env

added / updated specs:

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
bzip2-1.0.8                |       h2466b09_7          54 KB  conda-forge
libsqlite-3.46.0           |       h2466b09_0         856 KB  conda-forge
libzlib-1.3.1              |       h2466b09_1          55 KB  conda-forge
openssl-3.3.1              |       h2466b09_3         8.0 MB  conda-forge
pip-24.2                   |     pyhd8ed1ab_0         1.2 MB  conda-forge
python-3.8.19              |h4de0772_0_cpython        15.3 MB  conda-forge
setuptools-72.2.0          |     pyhd8ed1ab_0         1.4 MB  conda-forge
tk-8.6.13                  |       h5226925_1         3.3 MB  conda-forge
vc-14.3                    |      h8a93ad2_20          17 KB  conda-forge
vc14_runtime-14.40.33810   |      ha82c5b3_20         734 KB  conda-forge
vs2015_runtime-14.40.33810 |      h3bf8584_20          17 KB  conda-forge
wheel-0.44.0               |     pyhd8ed1ab_0          57 KB  conda-forge
------------------------------------------------------------
                                       Total:        31.0 MB

The following NEW packages will be INSTALLED:

bzip2 conda-forge/win-64::bzip2-1.0.8-h2466b09_7 ca-certificates conda-forge/win-64::ca-certificates-2024.7.4-h56e8100_0 libffi conda-forge/win-64::libffi-3.4.2-h8ffe710_5 libsqlite conda-forge/win-64::libsqlite-3.46.0-h2466b09_0 libzlib conda-forge/win-64::libzlib-1.3.1-h2466b09_1 openssl conda-forge/win-64::openssl-3.3.1-h2466b09_3 pip conda-forge/noarch::pip-24.2-pyhd8ed1ab_0 python conda-forge/win-64::python-3.8.19-h4de0772_0_cpython setuptools conda-forge/noarch::setuptools-72.2.0-pyhd8ed1ab_0 tk conda-forge/win-64::tk-8.6.13-h5226925_1 ucrt conda-forge/win-64::ucrt-10.0.22621.0-h57928b3_0 vc conda-forge/win-64::vc-14.3-h8a93ad2_20 vc14_runtime conda-forge/win-64::vc14_runtime-14.40.33810-ha82c5b3_20 vs2015_runtime conda-forge/win-64::vs2015_runtime-14.40.33810-h3bf8584_20 wheel conda-forge/noarch::wheel-0.44.0-pyhd8ed1ab_0 xz conda-forge/win-64::xz-5.2.6-h8d14728_0

Proceed ([y]/n)? y

Downloading and Extracting Packages:

CondaError: Downloaded bytes did not match Content-Length url: https://conda.anaconda.org/conda-forge/win-64/python-3.8.19-h4de0772_0_cpython.conda target_path: C:\Users\user\anaconda3\pkgs\python-3.8.19-h4de0772_0_cpython.conda Content-Length: 16090293 downloaded bytes: 719215

CondaError: Downloaded bytes did not match Content-Length url: https://conda.anaconda.org/conda-forge/win-64/python-3.8.19-h4de0772_0_cpython.conda target_path: C:\Users\user\anaconda3\pkgs\python-3.8.19-h4de0772_0_cpython.conda Content-Length: 16090293 downloaded bytes: 719215

(base) C:\Users\user\Documents\HODAP_2>conda activate my_env

EnvironmentNameNotFound: Could not find conda environment: my_env You can list all discoverable environments with conda info --envs.

(base) C:\Users\user\Documents\HODAP_2>conda info --envs

conda environments:

# C:\ProgramData\anaconda3 base * C:\Users\user\anaconda3 pytorchenv C:\Users\user\anaconda3\envs\pytorchenv

(base) C:\Users\user\Documents\HODAP_2>

I do not know what to do may be it is linked to the name(underscore) i dont know i will try with another name and another folder

Donarmando2 commented 2 months ago

Hi there – you mention that you are using Python 3.11, which is not supported. You need to use Python 3.8 otherwise some of the versions of the packages used in the book won't be available.

From the output you shared your computer is missing some system libraries, which is preventing you from installing numpy and anything that relies on it so the installation of the dependencies failed on your machine. For this reason, I recommend that you, as a Windows user, use conda and not venv. Follow the directions for conda, and it will also set you up with the correct Python version.

PS

almost done...But how to handle the last error ? conda 2 setup.txt

Donarmando2 commented 2 months ago

not only that mistake i am unable to launch jupyter..........from conda environment........(all those steps i was able to go through witn pip except package setup)

stefmolin commented 2 months ago

Your latest issues are related to your Internet connection. Can you try doing this instead?

conda env create --file environment.yml
github-actions[bot] commented 1 month ago

This issue has been marked as stale due to lack of recent activity. It will be closed if no further activity occurs.