Giter Site home page Giter Site logo

introtopython's People

Contributors

pdeitel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

introtopython's Issues

problem with installing Jupyter matplotlob

Hello, when I enter "jupyter labextension install @jupyter-widgets/jupyterlab-manager" in the terminal on my mac, this is the response: "An error occurred. ValueError: Please install nodejs >=12.0.0 before continuing. nodejs may be installed using conda or directly from the nodejs website". I tried to solve it, but nothing doesn't work. I'm new in this world, so pls help me. Thanks to everyone who will help me.

Lesson 1 - Module 3 - Executing a Python Program Using the Ipython Interpreter

When I ran the code:.
(base) C:\Users\me\Documents\examples\ch01>ipython RollDieDynamic.py 6000 1

The application did run but I received the following message in the terminal:

C:\Users\stste\anaconda3\Lib\site-packages\seaborn_oldcore.py:1765: FutureWarning: unique with argument that is not not a Series, Index, ExtensionArray, or np.ndarray is deprecated and will raise in a future version.
order = pd.unique(vector)

Below are the versions of Seaborn and Matplotlib installed on my system listed below:

(base) C:\Users\me\Documents\examples\ch01>conda list seaborn

packages in environment at C:\Users\stste\anaconda3:

Name Version Build Channel

seaborn 0.12.2 py311haa95532_0

(base) C:\Users\me\Documents\examples\ch01>conda list matplotlib

packages in environment at C:\Users\stste\anaconda3:

Name Version Build Channel

matplotlib 3.8.2 py311h1ea47a8_0 conda-forge
matplotlib-base 3.8.2 py311h6e989c2_0 conda-forge
matplotlib-inline 0.1.6 py311haa95532_0

Question I have and I'm just starting to learn Python. Would creating a Virtual Environment folder with the dependencies for Seaborn and Matplotlib that worked when these Live Lessons were created?

For example:
1> I created a new folder in my documents folder called "virtualenv"
2> In the terminal list all the Python versions installed on my computer py --list
3> In my list of Python installs I have version 3.9
4> To create a new virtual environment I would enter the following: py -3.9 - m venv vepy390
vepy390 is the name of the new folder created when I run the above command
Python 3.9 files will be copied to the vepy390 virtual environment folder
Run the command: vepy390\Scripts\activate
The Scripts folder would contain the dependencies (version) for the code that worked back when the Live Lessons were created.
The issue would be to download the dependencies versions that were used and worked correctly without any errors

Thank you

New changes coming in Matplotlib 3.6

Hello Paul,

I'm here just to provide you a new warning message I got when using Matplotlib - a DeprecationWarning to be more specific:

REF.: Chapter 6 - RollDieDynamic.py

  • ~/Programs/Python3/deitel/ch06/RollDieDynamic.py:34: MatplotlibDeprecationWarning: The resize_event function was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use callbacks.process('resize_event', ResizeEvent(...)) instead.

  • figure = plt.figure('Rolling a Six-Sided Die') # Figure for animation

  • ~/Programs/Python3/deitel/ch06/RollDieDynamic.py:43: MatplotlibDeprecationWarning: The resize_event function was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use callbacks.process('resize_event', ResizeEvent(...)) instead.

  • plt.show() # display window

Error on running RollDieDynamic.py // Not using Anaconda

When trying to run it on iPython I get the following error:

File "/Users/lmeinhardt/Programs/Python3/deitel/ch01/RollDieDynamic.py", line 17, in update
axes = sns.barplot(faces, frequencies, palette='bright') # new bars
TypeError: barplot() takes from 0 to 1 positional arguments but 2 positional arguments (and 1 keyword-only argument) were given

image

Note: Not using anaconda installation - using the standard installation from python.org - all libraries are installed and yet I get this error.

OS: MacOS 10.16
Python: Python 3.9.12

The content of the two parameters are:
Faces: [1, 2, 3, 4, 5, 6]
Frequencies: [0, 0, 0, 1, 0, 0]

Ananconda Package Install: conda install -c conda-forge ipyml

This is not really an issue but I believe this is an update to the following command:
conda install -c conda-forge ipyml

When I entered the command above I received the following:
PackagesNotFoundError: The following packages are not available from current channels:

  • ipyml

Current channels:

To search for alternate channels that may provide the conda package you're
looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

I went to GitHub:
https://github.com/conda-forge/ipympl-feedstock

I ran each of the 2 commands 1 by 1:
conda config --add channels conda-forge
conda install ipympl

Attached file contains the results.

If these commands are correct please let me know.

Thank you
Anaconda Update Commands 2 - install ipympl.txt

Errors about sys arguments

Hello,

From the video course I typed everything as perfect as it is and no matter what framework I tried to run(Jupyter-notebook,from terminal(ipython),Colab(from google) and even also tried using Pycharm I get the following error:


ValueError Traceback (most recent call last)
Input In [72], in <cell line: 30>()
27 axes.text(text_x, text_y, text, ha='center', va='bottom')
29 # read command-line arguments for number of frames and rolls per frame
---> 30 number_of_frames = int(sys.argv[1])
31 rolls_per_frame = int(sys.argv[2])
33 sns.set_style('whitegrid') # white backround with gray grid lines

ValueError: invalid literal for int() with base 10: '-f'

I just found your github now Paul and I also copied your code to my jupyter notebook and still got the same error message. What it does mean?

Publish a compatible anaconda environment file

I generated a fresh new anaconda environment including matplotlib 3.1.1 and pyqt 5.9.2
updated_environment.yml.txt
but when I try to execute
ipython RollDieDynamic.py 6000 1
i receive the message
QApplication: invalid style override passed, ignoring it.
(Notice that no problems arise when I execute python RollDieDynamic.py 6000 1, i.e. the python interpreter directly.

In order to correctly execute the command
ipython RollDieDynamic.py 6000 1
I need to set up a new environment with matplotlib 2.2.2 and pyqt 5.6
working_environment.yml.txt

It is advisable that a working environment is published along the code, so as to guarantee that all the examples will work without any problems.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.